示例#1
0
        private void ContextMenuStripListViewOnItemClicked(object sender, ToolStripItemClickedEventArgs e)
        {
            _slot.contextMenuStripListView.Hide();
            if (e.ClickedItem == _slot.toolStripMenuItemRestore)
            {
                ButtonRestoreOnClick(sender, null);
            }

            if (e.ClickedItem == _slot.toolStripMenuItemDelete)
            {
                ButtonDeleteOnClick(sender, null);
            }

            if (e.ClickedItem == _slot.toolStripMenuItemEdit)
            {
                var gameDetails = GetSelectedGameDetails();
                if (gameDetails != null)
                {
                    var formNotes = new FormNotes {
                        textBoxNotes = { Text = gameDetails.Notes }
                    };
                    if (formNotes.ShowDialog(_slot) == DialogResult.OK)
                    {
                        gameDetails.Notes = formNotes.textBoxNotes.Text;
                        var mapData = GetSelectedMap();
                        if (mapData != null)
                        {
                            RefreshListView(mapData);
                        }
                    }
                }
            }
        }
示例#2
0
 private void buttonNotes_Click(object sender, EventArgs e)
 {
     if (!data.Crypted())
     {
         FormNotes form = new FormNotes(data.notes);
         form.Show();
     }
     else
     {
         MessageBox.Show("Данные зашифрованы и их просмотр недоступен", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
示例#3
0
        private void ListViewSavedGamesOnDoubleClick(object sender, EventArgs e)
        {
            var gameDetails = GetSelectedGameDetails();

            if (gameDetails != null)
            {
                var formNotes = new FormNotes {
                    textBoxNotes = { Text = gameDetails.Notes }
                };
                if (formNotes.ShowDialog(_slot) == DialogResult.OK)
                {
                    gameDetails.Notes = formNotes.textBoxNotes.Text;
                    var mapData = GetSelectedMap();
                    if (mapData != null)
                    {
                        RefreshListView(mapData);
                    }
                }
            }
        }
示例#4
0
 private static void startApp()
 {
     Toolbox.setSettings();
     if (Toolbox.getSetting("1rstrun").Equals("No"))
     {
         FormMainN form;
         String scr = Toolbox.getSetting("screentype");
         if (scr.Equals("wide"))
         {
             form = new FormMainW();
         }
         else form = new FormMainN();
         Application.Run(form);
     }
     else
     {
         FormNotes nf = new FormNotes(null);
         Application.Run(nf);
     }
 }