Beispiel #1
0
        internal DialogResult ShowDialog(out Classification classification, out Importance importance, out bool infobox,
                                         out bool attention, out bool needsPhoto, string title)
        {
            Text += ": " + title;

            var ret = ShowDialog();

            if (ClassCheckedListBox.SelectedIndices.Count == 0)
            {
                classification = Classification.Unassessed;
            }
            else
            {
                classification = (Classification)ClassCheckedListBox.SelectedIndex;
            }
            if (ImportanceCheckedListBox.SelectedIndices.Count == 0)
            {
                importance = Importance.Unassessed;
            }
            else
            {
                importance = (Importance)ImportanceCheckedListBox.SelectedIndex;
            }
            infobox    = (SettingsCheckedListBox.GetItemCheckState(0) == CheckState.Checked);
            attention  = (SettingsCheckedListBox.GetItemCheckState(1) == CheckState.Checked);
            needsPhoto = (SettingsCheckedListBox.GetItemCheckState(2) == CheckState.Checked);

            return(ret);
        }
Beispiel #2
0
 private void ReadServerSettings()
 {
     ISServer.ISServerSettings settings = server.GetSettings();
     SettingsCheckedListBox.SetItemChecked(0, settings.EnableCursorSwitch);
     SettingsCheckedListBox.SetItemChecked(1, settings.ReleaseAllOnSwitch);
     SettingsCheckedListBox.SetItemChecked(2, settings.DisableSwitchWhileFullscreen);
 }
Beispiel #3
0
        internal DialogResult ShowDialog(ref Classification Clss, ref Importance Imp, ref bool Infobox, ref bool Attention, ref bool NeedsPhoto, string Title)
        {
            Text += ": " + Title;

            var ret = ShowDialog();

            if (ClassCheckedListBox.SelectedIndices.Count == 0)
            {
                Clss = Classification.Unassessed;
            }
            else
            {
                Clss = (Classification)ClassCheckedListBox.SelectedIndex;
            }
            if (ImportanceCheckedListBox.SelectedIndices.Count == 0)
            {
                Imp = Importance.Unassessed;
            }
            else
            {
                Imp = (Importance)ImportanceCheckedListBox.SelectedIndex;
            }
            Infobox    = (SettingsCheckedListBox.GetItemCheckState(0) == CheckState.Checked);
            Attention  = (SettingsCheckedListBox.GetItemCheckState(1) == CheckState.Checked);
            NeedsPhoto = (SettingsCheckedListBox.GetItemCheckState(2) == CheckState.Checked);

            return(ret);
        }
Beispiel #4
0
        private void ResetButton_Click(object sender, EventArgs e)
        {
            Settings.Instance.Reset();
            SetupSettingsToggles();

            for (int i = 0; i < SettingsCheckedListBox.Items.Count; i++)
            {
                SettingsCheckedListBox_ItemCheck(null, new ItemCheckEventArgs(i, SettingsCheckedListBox.GetItemCheckState(i), SettingsCheckedListBox.GetItemCheckState(i)));
            }
        }
Beispiel #5
0
 private bool serverSettingChecked(int index)
 {
     if (SettingsCheckedListBox.GetItemCheckState(index) == CheckState.Checked)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Beispiel #6
0
        private void StopServer()
        {
            server.Stop();
            ServerStartButton.Invoke(new Action(() => { ServerStartButton.Text = "Start server";
                                                        ClientListBox.Hide();
                                                        for (int i = 0; i < SettingsCheckedListBox.Items.Count; i++)
                                                        {
                                                            SettingsCheckedListBox.SetItemChecked(i, false);
                                                        }

                                                        UpdateClientList();
                                                        RedrawClientSettings(); }));
        }