public SplashScreen()
        {
            InitializeComponent();
            txtLoading.Text = AppResources.loading;

            if (this.syncManager == null)
                this.syncManager = new Synchronization();
            this.syncManager.SyncError += new Synchronization.EventHandler(syncManager_SyncError);
            this.syncManager.SyncComplete += new Synchronization.EventHandler(syncManager_SyncComplete);
        }
Exemple #2
0
        private void post_Click(object sender, EventArgs e)
        {
            string title = this.txtTitle.Text;
            string email = this.txtEmail.Text;
            string positivism = this.txtPositiv.Text;
            string negativism = this.txtNegativ.Text;

            bool humanYn = this.ddHuman.SelectedIndex == 0;
            bool freelanceYn = this.ddFreelance.SelectedIndex == 0;

            int categoryID = ((BombaJob.Database.Models.Category)this.ddCategory.SelectedItem).CategoryID;

            bool hasError = true;
            if (title.Trim().Equals(""))
                this.txtTitle.BorderBrush = new SolidColorBrush(Color.FromArgb(255, 255, 0, 0));
            else if (email.Trim().Equals("") || !AppSettings.ValidateEmail(email))
                this.txtEmail.BorderBrush = new SolidColorBrush(Color.FromArgb(255, 255, 0, 0));
            else if (positivism.Trim().Equals(""))
                this.txtPositiv.BorderBrush = new SolidColorBrush(Color.FromArgb(255, 255, 0, 0));
            else if (negativism.Trim().Equals(""))
                this.txtNegativ.BorderBrush = new SolidColorBrush(Color.FromArgb(255, 255, 0, 0));
            else if (categoryID < 0)
                this.ddCategory.BorderBrush = new SolidColorBrush(Color.FromArgb(255, 255, 0, 0));
            else
                hasError = false;

            if (hasError)
                MessageBox.Show(AppResources.offer_MissingReqFields);
            else
            {
                if (this.syncManager == null)
                    this.syncManager = new Synchronization();
                this.syncManager.SyncError += new Synchronization.EventHandler(syncManager_SyncError);
                this.syncManager.SyncComplete += new Synchronization.EventHandler(syncManager_SyncComplete);

                Dictionary<string, string> postParams = new Dictionary<string, string>();
                postParams.Add("oid", "0");
                postParams.Add("cid", "" + categoryID);
                postParams.Add("h", (humanYn ? "1" : "0"));
                postParams.Add("fr", (freelanceYn ? "1" : "0"));
                postParams.Add("tt", title);
                postParams.Add("em", email);
                postParams.Add("pos", positivism);
                postParams.Add("neg", negativism);
                postParams.Add("mob_app", "wp");
                this.syncManager.DoPostOffer(postParams);

                if (AppSettings.ConfPrivateData)
                    AppSettings.ConfPDEmail = email;
                else
                    AppSettings.ConfPDEmail = "";
            }
        }
Exemple #3
0
 private void btnOK_Click(object sender, EventArgs e)
 {
     if (AppSettings.ConfOnlineSearch)
     {
         if (this.syncManager == null)
             this.syncManager = new Synchronization();
         this.syncManager.SyncError += new Synchronization.EventHandler(syncManager_SyncError);
         this.syncManager.SyncComplete += new Synchronization.EventHandler(syncManager_SyncComplete);
         this.syncManager.DoSearch(this.txtKeyword.Text, this.chkFreelanceYn.SelectedIndex);
     }
     else
         NavigationService.Navigate(new Uri("/Views/SearchResults.xaml?k=" + this.txtKeyword.Text + "&f=" + this.chkFreelanceYn.SelectedIndex, UriKind.Relative));
 }
Exemple #4
0
 void People_Loaded(object sender, RoutedEventArgs e)
 {
     base.BuildApplicationBar();
     this.ApplicationBar.Mode = Microsoft.Phone.Shell.ApplicationBarMode.Minimized;
     this.jobsPanorama.Title = AppResources.appName;
     this.panCategories.Header = AppResources.menu_Categories;
     this.panOffers.Header = AppResources.menu_Offers;
     this.categoriesList.ItemsSource = App.DbViewModel.GetCategories(true);
     this.offersList.ItemsSource = App.DbViewModel.GetOffers(true);
     if (this.syncManager == null)
         this.syncManager = new Synchronization();
     this.syncManager.LoadOffersInBackground();
 }
Exemple #5
0
        private void send_Click(object sender, EventArgs e)
        {
            if (this.syncManager == null)
                this.syncManager = new Synchronization();
            this.syncManager.SyncError += new Synchronization.EventHandler(syncManager_SyncError);
            this.syncManager.SyncComplete += new Synchronization.EventHandler(syncManager_SyncComplete);

            if (!this.txtMessage.Text.Trim().Equals(""))
            {
                Dictionary<string, string> postParams = new Dictionary<string, string>();
                postParams.Add("oid", "" + this.offerID);
                postParams.Add("message", this.txtMessage.Text);
                this.syncManager.DoSendPM(postParams);
            }
            else
                MessageBox.Show(AppResources.offer_Message_Empty);
        }
 private void DoSearch()
 {
     if (this.syncManager == null)
         this.syncManager = new Synchronization();
     this.syncManager.SyncError += new Synchronization.EventHandler(syncManager_SearchError);
     this.syncManager.SyncComplete += new Synchronization.EventHandler(syncManager_SearchComplete);
     this.thinkThread = new Thread(load);
     this.thinkThread.Start();
 }
 public void SendPM()
 {
     this.tabm.StartLoading();
     AppSettings.LogThis("Send message... " + this.OfferMessage);
     if (this.syncManager == null)
         this.syncManager = new Synchronization();
     this.syncManager.SyncError += new Synchronization.EventHandler(syncManager_Error);
     this.syncManager.SyncComplete += new Synchronization.EventHandler(syncManager_Complete);
     this.thinkThread = new Thread(send);
     this.thinkThread.Start();
 }
        private void sendEmailViaWS(string toEmail)
        {
            if (this.syncManager == null)
                this.syncManager = new Synchronization();
            this.syncManager.SyncError += new Synchronization.EventHandler(syncManager_SyncError);
            this.syncManager.SyncComplete += new Synchronization.EventHandler(syncManager_SyncComplete);

            Dictionary<string, string> postArray = new Dictionary<string, string>();
            postArray.Add("oid", "" + this.currentOffer.OfferId);
            postArray.Add("toemail", toEmail);
            postArray.Add("fromemail", "");
            this.syncManager.DoSendEmail(postArray);
        }
Exemple #9
0
 public void PostOffer()
 {
     this.tabm.StartLoading();
     AppSettings.LogThis("Post offer... " + this.SelectedCategory.CategoryID);
     if (this.syncManager == null)
         this.syncManager = new Synchronization();
     this.syncManager.SyncError += new Synchronization.EventHandler(syncManager_Error);
     this.syncManager.SyncComplete += new Synchronization.EventHandler(syncManager_Complete);
     this.thinkThread = new Thread(post);
     this.thinkThread.Start();
 }