public void Copy(ActionBubble i_BubbleToCopy) { this.FrontBrush = i_BubbleToCopy.FrontBrush; this.BackBrush = i_BubbleToCopy.BackBrush; this.clickHandler = i_BubbleToCopy.clickHandler; this.Opacity = i_BubbleToCopy.Opacity; this.BubbleData = i_BubbleToCopy.BubbleData; }
private void addActionBubbleToRepasatory(ActionBubble i_BubbleToAdd) { if (i_BubbleToAdd != null) { apllicationStackPanel.Children.Remove(addActionBubble); apllicationStackPanel.Children.Add(i_BubbleToAdd); apllicationStackPanel.Children.Add(addActionBubble); } }
public ActionBubble(ActionBubble ab) { InitializeComponent(); this.Height = ab.Height; this.Width = ab.Width; this.front = ab.front; this.back = ab.back; this.BubbleData = ab.BubbleData; this.clickHandler = ab.clickHandler; }
public static ActionBubble createBubbleFromExe(string i_FileName) { ActionBubble ab = null; ImageBrush theIcon = utils.ImageBrushFromIconConverter.createImageBrushFromIcon(GeneralWinUtils.GetLargeIcon(i_FileName)); ab = CreateActionBubble(() => { Process.Start(i_FileName); }, theIcon); ab.BubbleData.ActionData = i_FileName; ab.BubbleData.BubbleType = eBubbleType.Exe; return(ab); }
public static ActionBubble CreateActionBubble(clickedHandler runFunction, ImageBrush imageBrush) { ActionBubble newActionBubble = new ActionBubble(); newActionBubble.Width = MainWindow.k_bubbleDiamater; newActionBubble.Height = MainWindow.k_bubbleDiamater; newActionBubble.Opacity = 1; newActionBubble.Margin = new System.Windows.Thickness(4); newActionBubble.setApp(runFunction, imageBrush); return(newActionBubble); }
private void Rectangle_Drop(object sender, DragEventArgs e) { ActionBubble refBubble = e.Data.GetData("Object") as ActionBubble; if (refBubble.BubbleData.BubbleType == eBubbleType.Exe) { apllicationStackPanel.Children.Remove(findActionBubbleInReposeory(refBubble)); } else { notifayAppsError("Cant Delete This Item"); } }
private void addActionBubble_Click(object sender, RoutedEventArgs e) { ActionBubble ab = WiisyScreenUIHelper.CreateCustomizeActionBubble(); if (ab != null) { if (findActionBubbleInReposeory(ab) == null) { addActionBubbleToRepasatory(ab); } else { notifayAppsError("App Alredy Exists"); } } }
public static ActionBubble CreateCustomizeActionBubble() { ActionBubble ab = null; Microsoft.Win32.OpenFileDialog dlg = new Microsoft.Win32.OpenFileDialog(); dlg.DefaultExt = ".exe"; dlg.Filter = "exe Files (*.exe)|*.exe"; Nullable <bool> result = dlg.ShowDialog(); if (result == true) { ab = createBubbleFromExe(dlg.FileName); } return(ab); }
private ActionBubble findActionBubbleInReposeory(ActionBubble i_BubbleToFind) { ActionBubble res = null; if (i_BubbleToFind.BubbleData.BubbleType == eBubbleType.Exe) { foreach (UIElement item in apllicationStackPanel.Children) { if (item is ActionBubble) { if ((item as ActionBubble).BubbleData.Equals(i_BubbleToFind.BubbleData)) { res = (item as ActionBubble); break; } } } } return(res); }
public static ActionBubble CreateActionBubbleFromData(ActionBubble.ActionBubbleData i_ActionBubbleData) { ActionBubble res = null; switch (i_ActionBubbleData.BubbleType) { case eBubbleType.Empty: res = CreateActionBubble(null, null); res.Opacity = 0.4; break; case eBubbleType.Exe: res = createBubbleFromExe(i_ActionBubbleData.ActionData); break; case eBubbleType.Board: res = CreateActionBubble(MainWindow.runBoard, createImageForEllipse("whiteboard-icon.png")); res.BubbleData = new ActionBubble.ActionBubbleData("BoardApp", eBubbleType.Board); break; case eBubbleType.Macro: res = CreateActionBubble(MainWindow.runMacroApp, createImageForEllipse("macroicon.png")); res.BubbleData = new ActionBubble.ActionBubbleData("MacroApp", eBubbleType.Macro); break; case eBubbleType.Calc: res = CreateActionBubble(() => winMacros.Macros.calc(), createImageForEllipse("calc.png")); res.BubbleData = new ActionBubble.ActionBubbleData("calc", eBubbleType.Calc); break; default: break; } return(res); }