Esempio n. 1
0
 private void  除用户ToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         if (dataGridView1.SelectedRows != null)
         {
             DialogResult dialogResult = MessageBox.Show("是否删除用户" + dataGridView1.SelectedRows[0].Cells[1].Value.ToString() + "?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
             if (dialogResult == DialogResult.OK)
             {
                 if (dataGridView1.SelectedRows[0].Cells[3].Value.ToString() == "管理员")
                 {
                     MessageBox.Show("无法删除管理员!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                 }
                 else
                 {
                     Sqloperate sqloperate = new Sqloperate();
                     //sqloperate.SqlCommands("delete from tb_user where UserName='******' and where UserPwd='"+dataGridView1.SelectedRows[0].Cells[1].Value.ToString()+"' and where LoginTime='"+dataGridView1.SelectedRows[0].Cells[2].Value.ToString()+"' and where UserPower='"+dataGridView1.SelectedRows[0].Cells[3].Value.ToString()+"'");
                     sqloperate.SqlCommands("delete from tb_user where UserId='" + dataGridView1.SelectedRows[0].Cells[0].Value + "'");
                     UpdateGrid ug = new UpdateGrid(UpDateGridView);
                     ug.Invoke();
                 }
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
 }
        private void CheckUpdates()
        {
            HttpRequest Req           = new HttpRequest();
            string      Response      = System.Convert.ToString(Req.Get("http://hft.zzz.com.ua/CrystalCloudScanner2/ccs2.html"));
            string      ActualVersion = Response.Substring("<p class=\"ActualVersion\">", "</p>");

            if (ActualVersion != Params.CurrentProgramVersion)
            {
                var Animation = new ThicknessAnimation();
                Animation.From     = new Thickness(0, -49, 0, 0);
                Animation.To       = new Thickness(0, 0, 0, 0);
                Animation.Duration = TimeSpan.FromSeconds(1);
                UpdateGrid.BeginAnimation(MarginProperty, Animation);
            }
        }
Esempio n. 3
0
 public void ChangeMonth(string direction)
 {
     if (direction == "Next")
     {
         Month++;
         UpdateGrid clearGrid  = () => Main.CalendarContentGrid.Children.Clear();
         UpdateGrid updateGrid = () => Main.CalendarContentGrid.Children.Add(createGrid());
         Main.Dispatcher.Invoke(clearGrid, DispatcherPriority.Render);
         Main.Dispatcher.Invoke(updateGrid, DispatcherPriority.Render);
     }
     else if (direction == "Previous")
     {
         Month--;
         UpdateGrid clearGrid  = () => Main.CalendarContentGrid.Children.Clear();
         UpdateGrid updateGrid = () => Main.CalendarContentGrid.Children.Add(createGrid());
         Main.Dispatcher.Invoke(clearGrid, DispatcherPriority.Render);
         Main.Dispatcher.Invoke(updateGrid, DispatcherPriority.Render);
     }
 }
Esempio n. 4
0
        public void Update(BurstSolverImpl solver, float deltaTime, JobHandle inputDeps)
        {
            var calculateCells = new CalculateCellCoords
            {
                simplexBounds = solver.simplexBounds,
                cellCoords    = solver.cellCoords,
                is2D          = solver.abstraction.parameters.mode == Oni.SolverParameters.Mode.Mode2D,
            };

            inputDeps = calculateCells.Schedule(solver.simplexCounts.simplexCount, 4, inputDeps);

            var updateGrid = new UpdateGrid
            {
                grid         = grid,
                cellCoords   = solver.cellCoords,
                simplexCount = solver.simplexCounts.simplexCount
            };

            updateGrid.Schedule(inputDeps).Complete();
        }