Beispiel #1
0
 public void Close()
 {
     TabDialog.Show("Closing", "Do you want close this Artboard?", "Close", "Cancel", () =>
     {
         RemoveTab();
     });
 }
Beispiel #2
0
        void Color_Click(object sender, RoutedEventArgs e)
        {
            PushButton push = sender as PushButton;

            switch (push.Tag)
            {
            case "Add":
                Color item = colorPicker.SelectedColor;
                VM.UsedColors.Add(new HubColor(item));
                break;

            case "Remove":
                if (lstColor.SelectedItem != null)
                {
                    foreach (HubColor color in lstColor.SelectedItems)
                    {
                        lstColor.Items.Remove(color);
                    }
                }
                break;

            case "Clear":
                TabDialog.Show("Clear Color", "Do you want to clear your Colors?", "Clear", "Cancel", () =>
                {
                    //Clear your notes
                    VM.UsedColors.Clear();
                });
                break;
            }
        }
Beispiel #3
0
        void Note_Click(object sender, RoutedEventArgs e)
        {
            PushButton push = sender as PushButton;

            switch (push.Tag)
            {
            case "Add":
                string str = txtEdit?.Text;
                VM.Notes.Add(str);
                break;

            case "Reomove":
                string item = (string)lstNotesTaken.SelectedItem;
                VM.Notes.Remove(item);
                break;

            case "Clear":
                TabDialog.Show("Clear Notes", "Do you want to clear notes", "Clear", "Cancel", () =>
                {
                    //Clear your notes
                    VM.Notes.Clear();
                });
                break;
            }
        }
Beispiel #4
0
        void Color_Click(object sender, RoutedEventArgs e)
        {
            PushButton push = sender as PushButton;

            switch (push.Tag)
            {
            case "Add":
                Color item = colorPicker.SelectedColor;
                VM.UsedColors.Add(new PadColor(item.ToString()));
                break;

            case "Remove":
                if (lstColor.SelectedItem != null)
                {
                    PadColor removeitem = (PadColor)lstColor?.SelectedItem;
                    VM.UsedColors.Remove(removeitem);
                }
                break;

            case "Clear":
                TabDialog.Show("Clear Color", "Do you want to clear your Colors?", "Clear", "Cancel", () =>
                {
                    //Clear your notes
                    VM.UsedColors.Clear();
                });
                break;
            }
        }
Beispiel #5
0
        static TabDialog LoadTabDialog(Stream fs)
        {
            var obj = new TabDialog(ReadString(fs), ReadFont(fs), ReadInt(fs), ReadInt(fs), ReadInt(fs), ReadInt(fs))
            {
                Enabled   = ReadBool(fs),
                Visible   = ReadBool(fs),
                ForeColor = ReadColor(fs)
            };

            var len = ReadInt(fs);

            for (var i = 0; i < len; i++)
            {
                if (fs.ReadByte() != 18)
                {
                    throw new Exception("Invalid item type; expected 18");
                }

                var t = new Tab("tab" + i, ReadString(fs));
                LoadChildren(fs, t, 0, obj.Font.Height + 12);

                obj.AddChild(t);
            }


            return(obj);
        }
Beispiel #6
0
 public void Close()
 {
     //Setup CLose Dialog
     TabDialog.Show("Closing", "Do you want to Close this Tab?", "Close", "Cancel", () =>
     {
         RemoveTab();
     });
 }
Beispiel #7
0
 public void Close()
 {
     TabDialog.Show("Closing", "Do you want Close this Tab?", "Close", "Cancel", () =>
     {
         //Remove the tab
         RemoveTab();
     });
 }
Beispiel #8
0
 public void Close()
 {
     //Dialog Lamba
     TabDialog.Show("Closing Tab", "Do you want to close this Tab?", "Close", "Cancel", () =>
     {
         //Remove Tab
         RemoveTab();
     });
 }
Beispiel #9
0
 public void Close()
 {
     TabDialog.Show("Closing", "Close Media Player", "Close", "Cancel", () =>
     {
         //Stop the Player
         myplayer.Stop();
         //Remove Tab
         RemoveTab();
     });
 }
Beispiel #10
0
 public void Close()
 {
     TabDialog.Show("Closing Tab", "Do you want to close this Conept?", "Close", "Cancel", () =>
     {
         //Close the Tab
         RemoveTab();
         //Send Message to the Application
         VM.Message("Closed Concept Tab", false);
     });
 }
Beispiel #11
0
 void Artboard_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         double width  = Convert.ToDouble(txtWidth.Text);
         double height = Convert.ToDouble(txtHeight.Text);
         //Add to the List
         VM.DrawSizes.Add(new PadDrawSize(width, height));
     }
     catch (Exception ex)
     {
         TabDialog.Show("Error", ex.Message, "Ok", "Cancel", () =>
         {
             txtWidth.Text  = "";
             txtHeight.Text = "";
         });
     }
 }
Beispiel #12
0
        void AddRemoveCancel_Click(object sender, RoutedEventArgs e)
        {
            PushButton push = sender as PushButton;

            switch (push.Tag)
            {
            case "Remove":
                //Remove Item
                HubDrawSize item = (HubDrawSize)lstArtBoard?.SelectedItem;
                VM.DrawSizes.Remove(item);
                break;

            case "Clear":
                //Clear the list
                TabDialog.Show("Clearing", "Do you want clear all your sizes?", "Clear", "Cancel", () =>
                {
                    VM.DrawSizes.Clear();
                });
                break;
            }
        }