コード例 #1
0
ファイル: FormMainEditor.cs プロジェクト: marcinkow/c_hasz
        //private void pictureBoxIconEditor_MouseMove(object sender, MouseEventArgs e)
        //{

        //    if (e.Button == MouseButtons.Left)
        //    {

        //    }

        //}

        private void pictureBoxIconEditor_MouseDown(object sender, MouseEventArgs e)
        {
            if (comboBoxIconList.SelectedItem != null)
            {
                Icon selectedIcon = comboBoxIconList.SelectedItem as Icon;

                if (selectedIcon.IconPoints.Count(p => p.X == e.X / FieldSize &&
                                                  p.Y == e.Y / FieldSize) > 0)
                {
                    DC.IconPoints.DeleteAllOnSubmit(selectedIcon.IconPoints.Where(p => p.X == e.X / FieldSize &&
                                                                                  p.Y == e.Y / FieldSize));
                }
                else
                {
                    IconPoint ip = new IconPoint();
                    ip.X     = e.X / FieldSize;
                    ip.Y     = e.Y / FieldSize;
                    ip.Color = buttonColor.BackColor.ToArgb();

                    //selectedIcon.IconPoints.Add(ip);

                    ip.Icon = selectedIcon;
                }

                DC.SubmitChanges();
                LoadIconList(selectedIcon);
            }
        }
コード例 #2
0
ファイル: FormMainEditor.cs プロジェクト: marcinkow/c_hasz
        private void pictureBoxIconEditor_MouseMove(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Left)
            {
                if (checkBoxdDrawing.Checked)
                {
                    Icon selectedIcon = comboBoxIconList.SelectedItem as Icon;

                    IconPoint ip = new IconPoint();
                    ip.X     = e.X / FieldSize;
                    ip.Y     = e.Y / FieldSize;
                    ip.Color = buttonColor.BackColor.ToArgb();

                    //selectedIcon.IconPoints.Add(ip);

                    ip.Icon = selectedIcon;


                    DC.SubmitChanges();
                    LoadIconList(selectedIcon);
                }
                else if (checkBox2.Checked)
                {
                    Icon selectedIcon = comboBoxIconList.SelectedItem as Icon;
                    DC.IconPoints.DeleteAllOnSubmit(selectedIcon.IconPoints.Where(p => p.X == e.X / FieldSize &&
                                                                                  p.Y == e.Y / FieldSize));
                    DC.SubmitChanges();
                    LoadIconList(selectedIcon);
                }
            }
        }
コード例 #3
0
 partial void DeleteIconPoint(IconPoint instance);
コード例 #4
0
 partial void UpdateIconPoint(IconPoint instance);
コード例 #5
0
 partial void InsertIconPoint(IconPoint instance);
コード例 #6
0
 private void detach_IconPoints(IconPoint entity)
 {
     this.SendPropertyChanging();
     entity.Icon = null;
 }
コード例 #7
0
 private void attach_IconPoints(IconPoint entity)
 {
     this.SendPropertyChanging();
     entity.Icon = this;
 }