示例#1
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            comboBoxRotation.SelectedIndex = 0;
            comboBoxFlipping.SelectedIndex = 0;
            comboBoxEnvironment.DataSource = Level.EnvironmentsNames;

            ClipboardNotification.ClipboardUpdate += ClipboardNotification_ClipboardUpdate;
            ClipboardNotification_ClipboardUpdate(null, EventArgs.Empty);

            foreach (Control ctrl in panelAllowedBlocks.Controls)
            {
                ((CheckBox)ctrl).CheckedChanged += new EventHandler(checkBoxBlocks_CheckedChanged);
            }

            LevelsManager = new LevelsManager(LevelsManager.SteamUsers().FirstOrDefault());
            LoadLevels();

            BlockInfosManager        = new BlockInfosManager();
            formBlockReference       = new FormBlockReference();
            formBlockReference.Owner = this;
            formAxisHelp             = new FormAxisHelp();
            formImageConverter       = new FormColors();
            formImageConverter.Owner = this;
            formScripting            = new FormScripting();
            formScripting.Owner      = this;
        }
示例#2
0
 private void LoadLevels()
 {
     listViewLevels.Items.Clear();
     statusProgressbar.Maximum = LevelsManager.CountLevels();
     statusProgressbar.Value   = 0;
     backgroundWorkerLoadLevels.RunWorkerAsync();
 }
示例#3
0
 private void backgroundWorkerLoadLevels_DoWork(object sender, DoWorkEventArgs e)
 {
     foreach (Level lvl in LevelsManager.GetLevels())
     {
         ListViewItem item = lvl.ListViewItem;
         item.Group = listViewLevels.Groups[(int)lvl.Source];
         backgroundWorkerLoadLevels.ReportProgress(0, item);
     }
 }
示例#4
0
 private void buttonReloadLevels_Click(object sender, EventArgs e)
 {
     buttonReloadLevels.Enabled = false;
     LevelsManager.ClearLoadedLevels();
     LoadLevels();
 }