Exemplo n.º 1
0
 public EpicView(ScrumSurface surface, int viewID)
     : base(surface, viewID)
 {
     InitTimer();
     this.allowControls[typeof(Epic)] = 1;
     this.ShowInvisible = true;
 }
Exemplo n.º 2
0
 /// <summary>
 /// Aktualisiert eine neue Datenbank
 /// </summary>
 /// <param name="surface"></param>
 public ScrumDatabase(ScrumSurface surface)
 {
     this.EffortSum   = new EffortPoints(0);
     this.Surface     = surface;
     this.UserStories = new List <UserStory>();
     this.Epics       = new List <Epic>();
 }
Exemplo n.º 3
0
        public static DialogControl <T> ShowDialog(ScrumSurface surface, DialogInfo info, MessageDialog.OptionTypes types)
        {
            DialogControl <T> dia = ShowDialog(surface, types);

            dia.InitializeDialog(info);
            return(dia);
        }
Exemplo n.º 4
0
 /// <summary>
 /// Erstellt ein neues ScrumNetwork-Objekt
 /// </summary>
 /// <param name="surface">Die Oberfläche, mit welcher das ScrumNetwork verbunden werden soll</param>
 public ScrumNetwork(ScrumSurface surface)
 {
     this.Surface = surface;
     InitAudio();
     InitButtons();
     InitSurfaceListener();
 }
Exemplo n.º 5
0
        /// <summary>
        /// Wandelt ein XML-Element in eine Epic um
        /// </summary>
        /// <param name="root"></param>
        /// <param name="surface"></param>
        /// <returns></returns>
        private Epic ConvertToEpic(XElement root, ScrumSurface surface)
        {
            Epic item = new Epic();

            ConvertToItemBase(root, item, surface);
            return(item);
        }
Exemplo n.º 6
0
 /// <summary>
 /// Lädt die Eigenschaften in ein Item, die User Stories und Epics teilen
 /// </summary>
 /// <param name="root"></param>
 /// <param name="item"></param>
 /// <param name="surface"></param>
 private void ConvertToItemBase(XElement root, ItemBase item, ScrumSurface surface)
 {
     item.ItemID    = short.Parse(root.Element("ItemID").Value);
     item.Title     = root.Element("Title").Value;
     item.IsVisible = bool.Parse(root.Element("Visibility").Value);
     LoadReps(root.Element("Representations"), item, surface);
 }
Exemplo n.º 7
0
 void MainWindow_Loaded(object sender, RoutedEventArgs e)
 {
     //Neues Scrum-Surface Objekt initialisieren
     surface = new ScrumSurface();
     this.AddChild(surface);
     surface.Loaded += surface_Loaded;
 }
Exemplo n.º 8
0
 public PriorityView(ScrumSurface surface, int viewID)
     : base(surface, viewID)
 {
     this.settingsLoader = new SettingsLoader.PriorityLoader(this);
     this.allowControls[typeof(Epic)] = 0;
     this.freeMovement = false;
 }
Exemplo n.º 9
0
        public static DialogControl <T> ShowDialog(ScrumSurface surface, DialogInfo info)
        {
            DialogControl <T> dia = ShowDialog(surface);

            dia.InitializeDialog(info);
            return(dia);
        }
Exemplo n.º 10
0
 public Button(ScrumSurface surface, ButtonType _type) : base(surface)
 {
     Type = _type;
     this.IsHitTestVisible = true;
     InitializeComponent();
     InitType();
 }
Exemplo n.º 11
0
 public EffortView(ScrumSurface surface, int viewID)
     : base(surface, viewID)
 {
     this.settingsLoader              = new SettingsLoader.EffortLoader(this);
     this.Surface.SizeChanged        += Surface_SizeChanged;
     this.allowControls[typeof(Epic)] = 0;
     this.freeMovement = false;
 }
Exemplo n.º 12
0
        public StandardView(ScrumSurface surface, int viewID)
            : base(surface, viewID)
        {
            prioSorting          = surface.GestureManager.AddGesture(surface, DefinedGestures.Line, LineCallback);
            prioSorting.IsActive = false;

            InitBlendIn();
        }
Exemplo n.º 13
0
 /// <summary>
 /// Wandelt ein XML-Element in ein Objekt vom Typ T
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="root"></param>
 /// <param name="surface">Die Surface, für welche diese Aktion ausgeführt wird</param>
 /// <returns></returns>
 private T ConvertToObject <T>(XElement root, ScrumSurface surface)
 {
     if (root.HasElements)
     {
         return(LoadItem <T>(root.Elements().First(), surface));
     }
     return(default(T));
 }
Exemplo n.º 14
0
        public void Init(ScrumSurface surface)
        {
            this.Surface = surface;

            // Start auto update
            TimerCallback callback = new TimerCallback(UpdateUI);

            _uiUpdateTimer = new Timer(callback, null, 100, 100);
        }
Exemplo n.º 15
0
 public ConnectionLine(SurfaceObject controlA, SurfaceObject controlB)
 {
     this.ControlA = controlA;
     this.ControlB = controlB;
     this.Surface  = this.ControlA.Surface;
     InitLine();
     InitEvents();
     UpdateLine();
 }
Exemplo n.º 16
0
 public EffortBars(ScrumSurface sur)
 {
     surface = sur;
     InitializeComponent();
     this.HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch;
     this.VerticalAlignment   = System.Windows.VerticalAlignment.Stretch;
     InitBars();
     surface.SizeChanged += Effort_SizeChanged;
 }
Exemplo n.º 17
0
        /// <summary>
        /// Wandelt ein XML-Element in eine Liste mit Objekten von Typ T.
        /// Unterstützte Typen:
        /// -- List of any Items
        /// -- List of Epics
        /// -- List of UserStories
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="root"></param>
        /// <param name="surface"></param>
        /// <returns></returns>
        private List <T> ConvertToItemList <T>(XElement root, ScrumSurface surface)
        {
            List <T> items = new List <T>();

            foreach (XElement element in root.Elements())
            {
                items.Add(LoadItem <T>(element, surface));
            }
            return(items);
        }
Exemplo n.º 18
0
 public BaseView(ScrumSurface surface, int viewId)
 {
     this.allowControls.Add(typeof(UserStory), 1);
     this.allowControls.Add(typeof(Epic), 0);
     this.Surface         = surface;
     this.ViewID          = viewId;
     this.settingsLoader  = new StandardSettingsLoader(this);
     _elements            = new List <UIElement>();
     this.VisibleControls = new List <ItemControl>();
 }
Exemplo n.º 19
0
        /// <summary>
        /// Wandelt ein XML-Element in eine User Story um
        /// </summary>
        /// <param name="root"></param>
        /// <param name="surface"></param>
        /// <returns></returns>
        private UserStory ConvertToUserStory(XElement root, ScrumSurface surface)
        {
            UserStory item = new UserStory();

            item.Priority      = int.Parse(root.Element("Priority").Value);
            item.Effort.Value  = int.Parse(root.Element("Effort").Value);
            item.temp_epicID   = short.Parse(root.Element("Epic").Value);
            item.BacklogStatus = (ItemBacklogStatus)int.Parse(root.Element("Backlog").Value);
            item.Text          = root.Element("Text").Value;
            ConvertToItemBase(root, item, surface);
            return(item);
        }
Exemplo n.º 20
0
 public StandardSurfaceObject(ScrumSurface surface)
     : base(surface)
 {
     MaxHeight = 1000;
     MaxWidth  = 1000;
     MinHeight = 40;
     MinWidth  = 40;
     Left      = 0;
     Top       = 0;
     Width     = 10;
     Height    = 10;
 }
Exemplo n.º 21
0
 public ViewPicker(ScrumSurface surface) : base(surface)
 {
     cpick        = new CollapsedPicker();
     epick        = new ExtendedPicker();
     this.Loaded += ViewPicker_Loaded;
     //Anzeige der aktuellen Ansicht anpassen, wenn sie geändert wurde
     Surface.ViewController.ViewChanged += (s, e) =>
     {
         cpick.currentView.Text = Surface.ViewController.CurrentView.Name;
         epick.currentView.Text = Surface.ViewController.CurrentView.Name;
     };
 }
Exemplo n.º 22
0
 public ItemControl(ItemBase data, ScrumSurface surface)
     : base(surface)
 {
     Item = data;
     Item.AddRepresentation(this);
     Item.ExternalDataChanged     += ExternalDataChanged;
     this.DisplaySettings          = new DisplaySettingsCollection(this);
     this.ScaleChanged            += ItemControl_ScaleChanged;
     this.RotateTransform.Changed += RotateTransform_Changed;
     Animation.Animator.FadeIn(this);
     this.Moved += ItemControl_Moved;
     AutoPos();
 }
Exemplo n.º 23
0
        /// <summary>
        /// Lädt eine Datei in eine ScrumDatabase
        /// </summary>
        /// <param name="database">Die Datenbank, in die die Datei geladen werden soll</param>
        /// <param name="filepath">Der Pfad zur Datei</param>
        /// <param name="surface"></param>
        public void LoadFile(ScrumDatabase database, string filepath, ScrumSurface surface)
        {
            XElement root        = LoadFileToXElement(filepath);
            XElement epics       = root.Elements("EpicList").First();
            XElement userstories = root.Elements("UserStoryList").First();

            if (epics != null && userstories != null)
            {
                database.ClearItems();
                database.LoadItems(ConvertToItemList <Epic>(epics, surface));
                database.LoadItems(ConvertToItemList <UserStory>(userstories, surface));
            }
        }
Exemplo n.º 24
0
        public NoTouchLayer(ScrumSurface surface)
            : base(surface)
        {
            this.Width  = Surface.ActualWidth;
            this.Height = Surface.ActualHeight;

            this.SetUpperLeftCorner(0, 0);
            surface.SizeChanged += surface_SizeChanged;

            InitializeComponents();

            MaxWidth  = 4000;
            MaxHeight = 4000;
        }
Exemplo n.º 25
0
        public SurfaceObject(ScrumSurface surface)
        {
            IsPositionInitialized = false;
            HasResizeAnimation    = false;
            HasMovingAnimation    = false;
            HasRotateAnimation    = false;
            IsHidden = true;

            Gestures     = new Dictionary <string, GestureHandler>();
            this.Surface = surface;

            InitializeComponents();
            InitializeGestures();
        }
Exemplo n.º 26
0
        public static DialogControl <T> ShowDialog(ScrumSurface surface, MessageDialog.OptionTypes opts)
        {
            Func <DialogControl <T> > f = new Func <DialogControl <T> >(() =>
            {
                DialogControl <T> dia = new DialogControl <T>(surface, opts);
                return(dia);
            });

            if (Application.Current.Dispatcher.CheckAccess())
            {
                return(f.Invoke());
            }
            else
            {
                return((DialogControl <T>)Application.Current.Dispatcher.Invoke(f));
            }
        }
Exemplo n.º 27
0
 /// <summary>
 /// Wandelt eine XML-Element in eine Liste von Repräsentation um
 /// Erlaubt somit das Laden von gespeicherten DisplaySettings
 /// </summary>
 /// <param name="root"></param>
 /// <param name="item"></param>
 /// <param name="surface"></param>
 private void LoadReps(XElement root, ItemBase item, ScrumSurface surface)
 {
     foreach (XElement rep in root.Elements())
     {
         ItemControl ic = item.CreateRepresentation(surface);
         foreach (XElement set in rep.Elements())
         {
             int             view = int.Parse(set.Element("View").Value);
             DisplaySettings ds   = LoadSettings(set);
             if (ic.DisplaySettings.ContainsKey(view))
             {
                 ic.DisplaySettings[view] = ds;
             }
             else
             {
                 ic.DisplaySettings.Add(view, ds);
             }
         }
     }
 }
Exemplo n.º 28
0
        /// <summary>
        /// Zeigt ein Meldungsdialog mit den angegebenen Button-Optionen an
        /// </summary>
        /// <param name="surface">Die Oberfläche</param>
        /// <param name="dia">Die Buttons, die angezeigt werden sollen (im Nachrichten dialog)</param>
        public DialogControl(ScrumSurface surface, MessageDialog.OptionTypes dia) : base(surface)
        {
            InstantClosing = false;

            ConstructorInfo info = typeof(T).GetConstructor(new Type[2] {
                typeof(SurfaceObject), typeof(MessageDialog.OptionTypes)
            });

            _dialog = (T)info.Invoke(new object[2] {
                this, dia
            });
            this.Root.Children.Add(_dialog);

            _dialog.DialogFinished += _dialog_DialogFinished;

            _layer = new NoTouchLayer(surface);

            Surface.SizeChanged += Surface_SizeChanged;
            BringToFront();
            this.Loaded += (s, e) => { this.MoveCenter(surface.ActualWidth / 2, surface.ActualHeight / 2); };
        }
Exemplo n.º 29
0
        /// <summary>
        /// Wandelt ein XML-Element in ein Objekt um.
        /// Unterstützte Typen:
        /// -- UserStory
        /// -- Epic
        /// -- List of any Items
        /// -- List of Epics
        /// -- List of UserStories
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="root"></param>
        /// <param name="surface"></param>
        /// <returns></returns>
        private object LoadItem(XElement root, ScrumSurface surface)
        {
            switch (root.Name.ToString())
            {
            case "UserStory":
                return(ConvertToUserStory(root, surface));

            case "Epic":
                return(ConvertToEpic(root, surface));

            case "ItemList":
                return(ConvertToItemList <ItemBase>(root, surface));

            case "EpicList":
                return(ConvertToItemList <Epic>(root, surface));

            case "UserStoryList":
                return(ConvertToItemList <UserStory>(root, surface));

            default:
                return(null);
            }
        }
Exemplo n.º 30
0
 public DeleteButton(ScrumSurface surface) : base(surface, ButtonType.Image)
 {
     this.SetValue(Images.delete96);
 }