コード例 #1
0
ファイル: AEMacroManager.cs プロジェクト: xuan2261/EMM
        public void SetCurrentTemplate(MacroTemplate macro, string path)
        {
            var old = selectedMacro;

            selectedMacro = macro;

            SelectChanged?.Invoke(this, new MacroSelectionChangedEventArgs(old, selectedMacro, path));
        }
コード例 #2
0
 protected virtual void OnSelectChanged()
 {
     SelectChanged?.Invoke(this, EventArgs.Empty);
 }
コード例 #3
0
 /// <summary>
 /// 调用事件SelectChanged
 /// </summary>
 public void OnSelectChanged()
 {
     SelectChanged?.Invoke(this, new SelectedPositionChangedEventArgs(CurrentIndex));
 }
コード例 #4
0
ファイル: MainWindow.xaml.cs プロジェクト: Groveer/HSMS
 private void SelectedMethod(object obj)
 {
     SelectChanged?.Invoke((int)obj);
 }
コード例 #5
0
        /*************************************************************************************************************************************************/
        public MainWindow()
        {
            InitializeComponent();
            #region Initializations
            //Save every cell
            cellsArray = new Cell[9, 9];
            auxArray   = new Cell[9, 9];
            //TODO: Find another way to do this
            #region FillCellsArray
            //Box00
            cellsArray[0, 0] = Sudoku.box00.array[0, 0];
            cellsArray[0, 1] = Sudoku.box00.array[0, 1];
            cellsArray[0, 2] = Sudoku.box00.array[0, 2];
            cellsArray[1, 0] = Sudoku.box00.array[1, 0];
            cellsArray[1, 1] = Sudoku.box00.array[1, 1];
            cellsArray[1, 2] = Sudoku.box00.array[1, 2];
            cellsArray[2, 0] = Sudoku.box00.array[2, 0];
            cellsArray[2, 1] = Sudoku.box00.array[2, 1];
            cellsArray[2, 2] = Sudoku.box00.array[2, 2];
            //Box01
            cellsArray[0, 3] = Sudoku.box01.array[0, 0];
            cellsArray[0, 4] = Sudoku.box01.array[0, 1];
            cellsArray[0, 5] = Sudoku.box01.array[0, 2];
            cellsArray[1, 3] = Sudoku.box01.array[1, 0];
            cellsArray[1, 4] = Sudoku.box01.array[1, 1];
            cellsArray[1, 5] = Sudoku.box01.array[1, 2];
            cellsArray[2, 3] = Sudoku.box01.array[2, 0];
            cellsArray[2, 4] = Sudoku.box01.array[2, 1];
            cellsArray[2, 5] = Sudoku.box01.array[2, 2];
            //Box02
            cellsArray[0, 6] = Sudoku.box02.array[0, 0];
            cellsArray[0, 7] = Sudoku.box02.array[0, 1];
            cellsArray[0, 8] = Sudoku.box02.array[0, 2];
            cellsArray[1, 6] = Sudoku.box02.array[1, 0];
            cellsArray[1, 7] = Sudoku.box02.array[1, 1];
            cellsArray[1, 8] = Sudoku.box02.array[1, 2];
            cellsArray[2, 6] = Sudoku.box02.array[2, 0];
            cellsArray[2, 7] = Sudoku.box02.array[2, 1];
            cellsArray[2, 8] = Sudoku.box02.array[2, 2];

            //Box10
            cellsArray[3, 0] = Sudoku.box10.array[0, 0];
            cellsArray[3, 1] = Sudoku.box10.array[0, 1];
            cellsArray[3, 2] = Sudoku.box10.array[0, 2];
            cellsArray[4, 0] = Sudoku.box10.array[1, 0];
            cellsArray[4, 1] = Sudoku.box10.array[1, 1];
            cellsArray[4, 2] = Sudoku.box10.array[1, 2];
            cellsArray[5, 0] = Sudoku.box10.array[2, 0];
            cellsArray[5, 1] = Sudoku.box10.array[2, 1];
            cellsArray[5, 2] = Sudoku.box10.array[2, 2];
            //Box11
            cellsArray[3, 3] = Sudoku.box11.array[0, 0];
            cellsArray[3, 4] = Sudoku.box11.array[0, 1];
            cellsArray[3, 5] = Sudoku.box11.array[0, 2];
            cellsArray[4, 3] = Sudoku.box11.array[1, 0];
            cellsArray[4, 4] = Sudoku.box11.array[1, 1];
            cellsArray[4, 5] = Sudoku.box11.array[1, 2];
            cellsArray[5, 3] = Sudoku.box11.array[2, 0];
            cellsArray[5, 4] = Sudoku.box11.array[2, 1];
            cellsArray[5, 5] = Sudoku.box11.array[2, 2];
            //Box12
            cellsArray[3, 6] = Sudoku.box12.array[0, 0];
            cellsArray[3, 7] = Sudoku.box12.array[0, 1];
            cellsArray[3, 8] = Sudoku.box12.array[0, 2];
            cellsArray[4, 6] = Sudoku.box12.array[1, 0];
            cellsArray[4, 7] = Sudoku.box12.array[1, 1];
            cellsArray[4, 8] = Sudoku.box12.array[1, 2];
            cellsArray[5, 6] = Sudoku.box12.array[2, 0];
            cellsArray[5, 7] = Sudoku.box12.array[2, 1];
            cellsArray[5, 8] = Sudoku.box12.array[2, 2];

            //Box20
            cellsArray[6, 0] = Sudoku.box20.array[0, 0];
            cellsArray[6, 1] = Sudoku.box20.array[0, 1];
            cellsArray[6, 2] = Sudoku.box20.array[0, 2];
            cellsArray[7, 0] = Sudoku.box20.array[1, 0];
            cellsArray[7, 1] = Sudoku.box20.array[1, 1];
            cellsArray[7, 2] = Sudoku.box20.array[1, 2];
            cellsArray[8, 0] = Sudoku.box20.array[2, 0];
            cellsArray[8, 1] = Sudoku.box20.array[2, 1];
            cellsArray[8, 2] = Sudoku.box20.array[2, 2];
            //Box21
            cellsArray[6, 3] = Sudoku.box21.array[0, 0];
            cellsArray[6, 4] = Sudoku.box21.array[0, 1];
            cellsArray[6, 5] = Sudoku.box21.array[0, 2];
            cellsArray[7, 3] = Sudoku.box21.array[1, 0];
            cellsArray[7, 4] = Sudoku.box21.array[1, 1];
            cellsArray[7, 5] = Sudoku.box21.array[1, 2];
            cellsArray[8, 3] = Sudoku.box21.array[2, 0];
            cellsArray[8, 4] = Sudoku.box21.array[2, 1];
            cellsArray[8, 5] = Sudoku.box21.array[2, 2];
            //Box22
            cellsArray[6, 6] = Sudoku.box22.array[0, 0];
            cellsArray[6, 7] = Sudoku.box22.array[0, 1];
            cellsArray[6, 8] = Sudoku.box22.array[0, 2];
            cellsArray[7, 6] = Sudoku.box22.array[1, 0];
            cellsArray[7, 7] = Sudoku.box22.array[1, 1];
            cellsArray[7, 8] = Sudoku.box22.array[1, 2];
            cellsArray[8, 6] = Sudoku.box22.array[2, 0];
            cellsArray[8, 7] = Sudoku.box22.array[2, 1];
            cellsArray[8, 8] = Sudoku.box22.array[2, 2];
            #endregion
            ui = new UpdateInterface(UpdateCellNumber);
            id = new InterfaceDebug(InterfaceDebugger);
            //dd = new DiscardDelegate(Descartar);
            cb = new CheckBoxesDel(CheckBoxes);
            sc = new SelectChanged(SelChanged);
            foreach (Box box in Sudoku.SudokuGrid.Children)
            {
                boxes.Add(box);
            }
            stateComboBox.DisplayMemberPath = "Name";
            ResetSudoku();
            mw = this;
            #endregion
        }
コード例 #6
0
 private void ListBoxContent_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     SelectChanged?.Invoke();
 }