Skip to content

Commit

Permalink
Added select all/none/invert to language display list
Browse files Browse the repository at this point in the history
  • Loading branch information
Klocman committed Apr 12, 2017
1 parent f513d22 commit e22c2d5
Show file tree
Hide file tree
Showing 12 changed files with 566 additions and 445 deletions.
43 changes: 43 additions & 0 deletions src/Controls/LanguageSettings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

42 changes: 42 additions & 0 deletions src/Controls/LanguageSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,47 @@ private void listView1_ItemChecked(object sender, ItemCheckedEventArgs e)
{
OnEnabledLanguagesChanged();
}

private void toolStripButtonSelectAll_Click(object sender, EventArgs e)
{
SetAllItemsChecked(CheckState.Checked);
}

private void toolStripButtonSelectNone_Click(object sender, EventArgs e)
{
SetAllItemsChecked(CheckState.Unchecked);
}

private void toolStripButtonSelectInvert_Click(object sender, EventArgs e)
{
SetAllItemsChecked(CheckState.Indeterminate);
}

private void SetAllItemsChecked(CheckState state)
{
listView1.BeginUpdate();
listView1.ItemChecked -= listView1_ItemChecked;

foreach (ListViewItem item in listView1.Items)
{
switch (state)
{
case CheckState.Checked:
item.Checked = true;
break;
case CheckState.Unchecked:
item.Checked = false;
break;
case CheckState.Indeterminate:
item.Checked = !item.Checked;
break;
}
}

listView1.ItemChecked += listView1_ItemChecked;
listView1.EndUpdate();

OnEnabledLanguagesChanged();
}
}
}
107 changes: 104 additions & 3 deletions src/Controls/LanguageSettings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,94 @@
<value>$this</value>
</data>
<data name="&gt;&gt;listView1.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<data name="toolStripButtonSelectAll.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAJKSURBVGhD7ZmvNwVRFIVfEARBEAVBFQRBEARBEARBEPwJ
gqAKgigIgj9AEEVRFBRBEARBEARBYG/LZTvrzp0fzuGtZb61vvBm7t1n3rw7796ZGfT09PT8a+bhBXyG
rwVv4BIcSmZg3RdQX+AsHDp2Ye6AS7LPUDECr2A6wGM4BS1jcB+mdpcf236dbXgN04HkPId1sE2ub/IR
8gvzBLmzA3NFrU2Gyx7M9bWGDL0HmCtmXYV1sE2ur/UOuqMFFP5bpe38W20yHNhGh+gcVNJ26k5VuF68
XT2Eiu5zJxfOM3sPdV8XeXGPwoTucycXvgJ1+09cgwnd7k5ouCG0Vmi4IbRWaLghtFZouCG0Vmi4IbRW
RDgnU87em++fvoio9Yl3OFe9OrsfwYR3rW94h59BzeSdZUK3u+MZblfSXJBOwoTuc8crfAHyNlfzlqGi
+9zxCJ+Adm3GX8ei+92pCl+EXL7XPUjgApPXgeacwhzaxp1cOBeN6ckJx/k0rOIAasYtHIc5tJ07uXB7
781hoxdtwt4RPsHSL6ht3cmFc8xzWOk+ftYzzV+J9xvaZh2W0LbuVIXzsY+9gPmYh1/GTnpUJ74qtL07
pXAuNexZ57A7Mdt4seudYBXax526cM4PpUemdtIrof3caRLOic1Odkk76ZXQfu40Dd+A2pbmJr0S2ted
NuFbMLWtmvRKtKnVmrbhfCxamvRKtK3Vii7hTS9uS5dajQkNN4TWavoQ21PWdKfpawVPw95o8UWPXVtF
GPqip6enp+evGQzeADa8/suVqEM+AAAAAElFTkSuQmCC
</value>
</data>
<data name="toolStripButtonSelectAll.ImageTransparentColor" type="System.Drawing.Color, System.Drawing">
<value>Magenta</value>
</data>
<data name="toolStripButtonSelectAll.Size" type="System.Drawing.Size, System.Drawing">
<value>73, 22</value>
</data>
<data name="toolStripButtonSelectAll.Text" xml:space="preserve">
<value>Select all</value>
</data>
<data name="toolStripButtonSelectNone.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAF3SURBVGhD7ZkhTsRAGIUrEIg9BBdAIBB7ACQCwVEQWASC
AyA5CnLlCgwCiUAgkIgV8P6ESf68DNtmmQ+aMF/ymen0vbaZVnSGTqfT+dcs5Uq+y48tPskTOUsO5dgN
ZDfySM6OK1m74G3GObNiTz7IcoF38kA6C3kjy7z119ivcyEfZbmQmvdyjJhTO7f4JuOG4wE151LWSt0p
y+Va1s51kaX3Kmtl7pkcI+bUznWfZXNyQSa+VmU8PqtTlkPMyUv0WGbKeNic78Lzy7urtzKTjzWnFh5P
9kXmY7sYL/e+LORjzamFn8o8/hPPZSGPNwcNN9AuNNxAu9BwA+1Cww20Cw030C403EC70HAD7ULDDbQL
DTfQLjTcQLvQcAPtQsMNtAsNN9AuNNxAu9BwA+1Cww20Cw030C403EC70HAD7ULDDbQLDTfQLjTcQLvQ
cAPtQsMNtGvqT+yWRmdzpm4rtBTb0YqNnvjjXittKbrR0+l0On/NMHwCC7WdE0ayXBEAAAAASUVORK5C
YII=
</value>
</data>
<data name="toolStripButtonSelectNone.ImageTransparentColor" type="System.Drawing.Color, System.Drawing">
<value>Magenta</value>
</data>
<data name="toolStripButtonSelectNone.Size" type="System.Drawing.Size, System.Drawing">
<value>88, 22</value>
</data>
<data name="toolStripButtonSelectNone.Text" xml:space="preserve">
<value>Select none</value>
</data>
<data name="toolStripButtonSelectInvert.ImageTransparentColor" type="System.Drawing.Color, System.Drawing">
<value>Magenta</value>
</data>
<data name="toolStripButtonSelectInvert.Size" type="System.Drawing.Size, System.Drawing">
<value>23, 22</value>
</data>
<data name="toolStripButtonSelectInvert.Text" xml:space="preserve">
<value>Invert selection</value>
</data>
<data name="toolStrip1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="toolStrip1.Size" type="System.Drawing.Size, System.Drawing">
<value>372, 25</value>
</data>
<data name="toolStrip1.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="toolStrip1.Text" xml:space="preserve">
<value>toolStrip1</value>
</data>
<data name="&gt;&gt;toolStrip1.Name" xml:space="preserve">
<value>toolStrip1</value>
</data>
<data name="&gt;&gt;toolStrip1.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;toolStrip1.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;toolStrip1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
<value>6, 13</value>
</data>
Expand All @@ -171,13 +257,28 @@
<data name="&gt;&gt;columnHeaderName.Type" xml:space="preserve">
<value>System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;toolStripButtonSelectAll.Name" xml:space="preserve">
<value>toolStripButtonSelectAll</value>
</data>
<data name="&gt;&gt;toolStripButtonSelectAll.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;toolStripButtonSelectNone.Name" xml:space="preserve">
<value>toolStripButtonSelectNone</value>
</data>
<data name="&gt;&gt;toolStripButtonSelectNone.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;toolStripButtonSelectInvert.Name" xml:space="preserve">
<value>toolStripButtonSelectInvert</value>
</data>
<data name="&gt;&gt;toolStripButtonSelectInvert.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>LanguageSettings</value>
</data>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>System.Windows.Forms.UserControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>
30 changes: 30 additions & 0 deletions src/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e22c2d5

Please sign in to comment.