예제 #1
0
        public HmTask(Hiveminder.Task task, HmBackend hmBackend)
        {
            this.task = task;
            this.backend = hmBackend;

            //Add Description as note.
            this.notes = new List<TaskNote>();

            if (!string.IsNullOrEmpty (this.task.Description))
                notes.Add (new HmNote (this.task));
        }
예제 #2
0
        private void OnAuthButtonClicked(object sender, EventArgs args)
        {
            username = this.emailEntry.Text;
            password = this.passwordEntry.Text;
            HmBackend.PreserveCredentials(username, password);

            try {
                Hiveminder.Hiveminder hm = new Hiveminder.Hiveminder(username, password);
            } catch (Exception e) {
                authButton.Label = "Try Again";
            }
        }
예제 #3
0
파일: HmTask.cs 프로젝트: teotikalki/tasque
        public HmTask(Hiveminder.Task task, HmBackend hmBackend)
        {
            this.task    = task;
            this.backend = hmBackend;

            //Add Description as note.
            this.notes = new List <INote>();

            if (!string.IsNullOrEmpty(this.task.Description))
            {
                notes.Add(new HmNote(this.task));
            }
        }
예제 #4
0
파일: HmTask.cs 프로젝트: teotikalki/tasque
        public static HmTask[] GetTasks(XmlNodeList list, HmBackend backend)
        {
            uint          i          = 0;
            XmlSerializer serializer = new XmlSerializer(typeof(Task));

            HmTask[] tasks = new HmTask[list.Count];

            foreach (XmlNode node in list)
            {
                tasks[i++] = new HmTask((Task)serializer.
                                        Deserialize(new StringReader(node.OuterXml)),
                                        backend);
            }

            return(tasks);
        }
예제 #5
0
        public HmPreferencesWidget() : base()
        {
            HmBackend.LoadCredentials(out this.username, out this.password);

            //Fixme Please ! I look UGLY!
            VBox mainVBox = new VBox(false, 12);

            mainVBox.BorderWidth = 10;
            mainVBox.Show();
            Add(mainVBox);

            HBox usernameBox = new HBox(false, 12);

            Gtk.Label emailLabel = new Label("Email Address");
            usernameBox.Add(emailLabel);
            emailEntry = new Entry(username);
            usernameBox.Add(emailEntry);
            usernameBox.ShowAll();
            mainVBox.PackStart(usernameBox, false, false, 0);

            HBox passwordBox = new HBox(false, 12);

            Gtk.Label passwordLabel = new Label("Password");
            passwordBox.Add(passwordLabel);
            passwordEntry = new Entry(password);
            passwordBox.Add(passwordEntry);
            passwordBox.ShowAll();
            mainVBox.PackStart(passwordBox, false, false, 0);

            // Status message label
            statusLabel          = new Label();
            statusLabel.Justify  = Gtk.Justification.Center;
            statusLabel.Wrap     = true;
            statusLabel.LineWrap = true;
            statusLabel.Show();
            statusLabel.UseMarkup    = true;
            statusLabel.UseUnderline = false;

            mainVBox.PackStart(statusLabel, false, false, 0);

            authButton = new LinkButton("Click Here to Connect");
            authButton.Show();
            mainVBox.PackStart(authButton, false, false, 0);
            mainVBox.ShowAll();

            authButton.Clicked += OnAuthButtonClicked;
        }
예제 #6
0
        public static HmTask[] GetTasks(XmlNodeList list, HmBackend backend)
        {
            uint i = 0;
            XmlSerializer serializer = new XmlSerializer(typeof(Task));
            HmTask[] tasks = new HmTask[list.Count];

            foreach (XmlNode node in list )
                tasks[i++] = new HmTask ((Task)serializer.
                             Deserialize(new StringReader(node.OuterXml)),
                             backend);

            return tasks;
        }