public void Close() { TabDialog.Show("Closing", "Do you want close this Artboard?", "Close", "Cancel", () => { RemoveTab(); }); }
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; } }
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; } }
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; } }
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); }
public void Close() { //Setup CLose Dialog TabDialog.Show("Closing", "Do you want to Close this Tab?", "Close", "Cancel", () => { RemoveTab(); }); }
public void Close() { TabDialog.Show("Closing", "Do you want Close this Tab?", "Close", "Cancel", () => { //Remove the tab RemoveTab(); }); }
public void Close() { //Dialog Lamba TabDialog.Show("Closing Tab", "Do you want to close this Tab?", "Close", "Cancel", () => { //Remove Tab RemoveTab(); }); }
public void Close() { TabDialog.Show("Closing", "Close Media Player", "Close", "Cancel", () => { //Stop the Player myplayer.Stop(); //Remove Tab RemoveTab(); }); }
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); }); }
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 = ""; }); } }
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; } }