protected override void OnCreate(Bundle savedInstanceState)
    {
      base.OnCreate(savedInstanceState);
      this.RequestWindowFeature(WindowFeatures.IndeterminateProgress);
      this.SetContentView(Resource.Layout.SimpleItemLayout);

      this.Prefs = Prefs.From(this);

      this.payloadRadioGroup = this.FindViewById<RadioGroup>(Resource.Id.group_payload_type);
      
      this.itemsListView = this.FindViewById<ListView>(Resource.Id.items_list);
      this.itemsListView.OnItemClickListener = this;

      this.scopeParentCheckBox = this.FindViewById<CheckBox>(Resource.Id.checkbox_scope_parent);
      this.scopeSelfCheckBox = this.FindViewById<CheckBox>(Resource.Id.checkbox_scope_self);
      this.scopeChildrenCheckBox = this.FindViewById<CheckBox>(Resource.Id.checkbox_scope_children);

      this.ScopeContainer = this.FindViewById<LinearLayout>(Resource.Id.container_scope);

      this.FieldNamEditText = this.FindViewById<EditText>(Resource.Id.field_item_field);

      this.ItemFieldEditText = this.FindViewById<EditText>(Resource.Id.field_item);
      this.ItemFieldLabel = this.FindViewById<TextView>(Resource.Id.label);

      this.GetItemsButton = this.FindViewById<Button>(Resource.Id.button_get_item);

      this.FieldNameContainer = this.FindViewById<LinearLayout>(Resource.Id.container_item_field);

      this.PayloadContainer = this.FindViewById<LinearLayout>(Resource.Id.container_payload);
    }
 // Use this for initialization
 void Start()
 {
     currentGameState = "playing";
     modal.SetActive(false);
     restartButton.onClick.AddListener(restartGame);
     prefs = GameObject.Find("Prefs").GetComponent<Prefs>();
 }
 public void UpdateLobby()
 {
     JSONObject data = new JSONObject();
     Prefs pref = new Prefs();
     data.AddField("token", pref.getToken());
     Debug.Log("Update Lobby" + data.ToString());
     sendRequest(ServerAPI.RequestType.UpdateLobby, data);
 }
 public void GetRoomStatus()
 {
     JSONObject data = new JSONObject();
     Prefs pref = new Prefs();
     data.AddField("token", pref.getToken());
     Debug.Log("GetRoomStatus" + data.ToString());
     sendRequest(ServerAPI.RequestType.GetGameStatus, data);
 }
    protected override void OnCreate(Bundle bundle)
    {
      base.OnCreate(bundle);
      this.RequestWindowFeature(WindowFeatures.IndeterminateProgress);

      SetContentView(Resource.Layout.activity_delete_item);
      this.Title = GetString(Resource.String.text_delete_item);

      this.prefs = Prefs.From(this);

      var deleteItemByIdButton = FindViewById<Button>(Resource.Id.button_delete_by_id);
      deleteItemByIdButton.Click += (sender, args) => this.DeleteItemById();

      var deleteItemByPathButton = FindViewById<Button>(Resource.Id.button_delete_by_path);
      deleteItemByPathButton.Click += (sender, args) => this.DeleteItemByPath();

      var deleteItemByQueryButton = FindViewById<Button>(Resource.Id.button_delete_by_query);
      deleteItemByQueryButton.Click += (sender, args) => this.DeleteItemByQuery();
    }
    protected override void OnCreate(Bundle bundle)
    {
      base.OnCreate(bundle);
      this.RequestWindowFeature(WindowFeatures.IndeterminateProgress);
      this.SetContentView(Resource.Layout.activity_create_item);

      this.Prefs = Prefs.From(this);

      this.ItemField = this.FindViewById<EditText>(Resource.Id.field_item);

      this.ItemNameField = this.FindViewById<EditText>(Resource.Id.field_item_name);

      this.ItemTitleFieldValue = this.FindViewById<EditText>(Resource.Id.field_item_title_field_name);
      this.ItemTextFieldValue = this.FindViewById<EditText>(Resource.Id.field_item_text_field_value);

      var createItemButton = this.FindViewById<Button>(Resource.Id.button_create_item);
      var updateCreatedItemButton = this.FindViewById<Button>(Resource.Id.button_update_created_item);

      createItemButton.Click += (sender, args) => this.PerformCreateRequest();
      updateCreatedItemButton.Click += (sender, args) => this.PerformUpdateCreatedItemRequest();
    }
Example #7
0
        public void NewPrefs(Prefs prefs)
        {
            // Delete and recreate all changed drives
            for (int i = 0; i < 4; i++)
            {
                //if ((GlobalPrefs.ThePrefs.DriveType[i] != prefs.DriveType[i]) || 
                //    GlobalPrefs.ThePrefs.DrivePath[i] != prefs.DrivePath[i] || 
                //    GlobalPrefs.ThePrefs.Emul1541Proc != prefs.Emul1541Proc)
                //{
                drive[i] = null;	// Important because UpdateLEDs is called from drive constructors (via set_error())

                if (!prefs.Emul1541Proc)
                {
                    if (prefs.DriveType[i] == DriveType.DRVTYPE_DIR)
                        drive[i] = new FSDrive(this, prefs.DrivePath[i]);
                    else if (prefs.DriveType[i] == DriveType.DRVTYPE_D64)
                        drive[i] = new D64Drive(this, prefs.DrivePath[i], prefs.DriveData[i]);
                    else
                        drive[i] = new T64Drive(this, prefs.DrivePath[i]);
                }
                //}
            }
            UpdateLEDs();
        }
 private void LoadPrefs()
 {
     prefs = Prefs.Load(PrefsKey);
 }
Example #9
0
        public void ClaimProcs_ComputeEstimatesByOrthoCase_SetClaimProcForEachProcType()
        {
            Prefs.UpdateString(PrefName.OrthoBandingCodes, "D8080");
            Prefs.UpdateString(PrefName.OrthoDebondCodes, "D8070");
            Prefs.UpdateString(PrefName.OrthoVisitCodes, "D8060");
            Patient       pat              = PatientT.CreatePatient(MethodBase.GetCurrentMethod().Name);
            Procedure     bandingProc      = ProcedureT.CreateProcedure(pat, "D8080", ProcStat.C, "", 0);
            PatPlan       patPlan          = PatPlanT.CreatePatPlan(1, pat.PatNum, 0);
            ClaimProc     bandingClaimProc = ClaimProcT.CreateClaimProc(pat.PatNum, bandingProc.ProcNum, 0, 0, bandingProc.ProcDate, 1, 1, 1);
            Procedure     visitProc        = ProcedureT.CreateProcedure(pat, "D8060", ProcStat.C, "", 0);
            ClaimProc     visitClaimProc   = ClaimProcT.CreateClaimProc(pat.PatNum, visitProc.ProcNum, 0, 0, visitProc.ProcDate, 1, 1, 1);
            Procedure     debondProc       = ProcedureT.CreateProcedure(pat, "D8070", ProcStat.C, "", 0);
            ClaimProc     debondClaimProc  = ClaimProcT.CreateClaimProc(pat.PatNum, debondProc.ProcNum, 0, 0, debondProc.ProcDate, 1, 1, 1);
            long          orthoCaseNum     = OrthoCaseT.InsertForFormOrthoCase(pat.PatNum, 2000, 1200, 0, 800, DateTime.Today, false, DateTime.Today.AddMonths(12), 1000, 400, 60, bandingProc);
            OrthoCase     orthoCase        = OrthoCases.GetOne(orthoCaseNum);
            OrthoPlanLink schedulePlanLink = OrthoPlanLinks.GetOneForOrthoCaseByType(orthoCaseNum, OrthoPlanLinkType.OrthoSchedule);
            OrthoSchedule orthoSchedule    = OrthoSchedules.GetOne(schedulePlanLink.FKey);

            OrthoProcLinks.LinkProcForActiveOrthoCase(bandingProc);
            OrthoProcLinks.LinkProcForActiveOrthoCase(visitProc);
            OrthoProcLinks.LinkProcForActiveOrthoCase(debondProc);
            List <OrthoProcLink> allProcLinks      = OrthoProcLinks.GetManyByOrthoCase(orthoCaseNum);
            OrthoProcLink        bandingLink       = allProcLinks.FirstOrDefault(x => x.ProcLinkType == OrthoProcType.Banding);
            OrthoProcLink        debondLink        = allProcLinks.FirstOrDefault(x => x.ProcLinkType == OrthoProcType.Debond);
            OrthoProcLink        visitLink         = allProcLinks.FirstOrDefault(x => x.ProcLinkType == OrthoProcType.Visit);
            List <ClaimProc>     listAllClaimProcs = new List <ClaimProc>()
            {
                bandingClaimProc, visitClaimProc, debondClaimProc
            };
            List <OrthoProcLink> listAllOrthoProcLinks = new List <OrthoProcLink>()
            {
                bandingLink, visitLink, debondLink
            };
            List <PatPlan> listPatPlans = new List <PatPlan>()
            {
                patPlan
            };

            ClaimProcs.ComputeEstimatesByOrthoCase(bandingProc, bandingLink, orthoCase, orthoSchedule, true, listAllClaimProcs,
                                                   new List <ClaimProc>()
            {
                bandingClaimProc
            }, listPatPlans, listAllOrthoProcLinks);
            ClaimProcs.ComputeEstimatesByOrthoCase(debondProc, debondLink, orthoCase, orthoSchedule, true, listAllClaimProcs,
                                                   new List <ClaimProc>()
            {
                debondClaimProc
            }, listPatPlans, listAllOrthoProcLinks);
            ClaimProcs.ComputeEstimatesByOrthoCase(visitProc, visitLink, orthoCase, orthoSchedule, true, listAllClaimProcs,
                                                   new List <ClaimProc>()
            {
                visitClaimProc
            }, listPatPlans, listAllOrthoProcLinks);
            Assert.AreEqual(bandingClaimProc.AllowedOverride, 0);
            Assert.AreEqual(bandingClaimProc.CopayOverride, 0);
            Assert.AreEqual(bandingClaimProc.PercentOverride, 0);
            Assert.AreEqual(bandingClaimProc.PaidOtherInsOverride, 0);
            Assert.AreEqual(bandingClaimProc.WriteOffEstOverride, 0);
            Assert.AreEqual(bandingClaimProc.InsEstTotalOverride, 600);
            Assert.AreEqual(debondClaimProc.AllowedOverride, 0);
            Assert.AreEqual(debondClaimProc.CopayOverride, 0);
            Assert.AreEqual(debondClaimProc.PercentOverride, 0);
            Assert.AreEqual(debondClaimProc.PaidOtherInsOverride, 0);
            Assert.AreEqual(debondClaimProc.WriteOffEstOverride, 0);
            Assert.AreEqual(debondClaimProc.InsEstTotalOverride, 240);
            Assert.AreEqual(visitClaimProc.AllowedOverride, 0);
            Assert.AreEqual(visitClaimProc.CopayOverride, 0);
            Assert.AreEqual(visitClaimProc.PercentOverride, 0);
            Assert.AreEqual(visitClaimProc.PaidOtherInsOverride, 0);
            Assert.AreEqual(visitClaimProc.WriteOffEstOverride, 0);
            Assert.AreEqual(visitClaimProc.InsEstTotalOverride, 36);
        }
 // Use this for initialization
 void Start()
 {
     Prefs prefs = new Prefs();
        GetComponent<InputField>().text = prefs.getText();
 }
Example #11
0
 public void SaveSetting <T>(string setName, T val)
 {
     this._engine.Invoke(() => Prefs.SetGameSetting(Program.GameEngine.Definition, setName, val));
 }
 protected virtual void SavePrefs()
 {
     Prefs.Save(prefsKey, prefs);
 }
Example #13
0
        public void Init(string path)
        {
            m_path = path;
            m_prefs = new Prefs(path);

            XmlDocument xml = DoReadXml(path);
            DoParseXml(xml);

            DoLoadPrefs();
        }
			/// <summary>
			/// This method saves prefs to EditorPrefs.
			/// </summary>
			/// <param name="key">Key.</param>
			/// <param name="prefs">EditorPrefs key.</param>
			public static void Save(string key, Prefs prefs) {
				WarnIfKeyUndefined(key);
				XmlSerializer xmlSerializer = new XmlSerializer(typeof(Prefs));
				StringWriter writer = new StringWriter();
				xmlSerializer.Serialize(writer, prefs);
				EditorPrefs.SetString(key, writer.ToString());
			}
Example #15
0
        ///<summary>Inserts one EhrTrigger into the database.  Provides option to use the existing priKey.  Doesn't use the cache.</summary>
        public static long InsertNoCache(EhrTrigger ehrTrigger, bool useExistingPK)
        {
            bool   isRandomKeys = Prefs.GetBoolNoCache(PrefName.RandomPrimaryKeys);
            string command      = "INSERT INTO ehrtrigger (";

            if (!useExistingPK && isRandomKeys)
            {
                ehrTrigger.EhrTriggerNum = ReplicationServers.GetKeyNoCache("ehrtrigger", "EhrTriggerNum");
            }
            if (isRandomKeys || useExistingPK)
            {
                command += "EhrTriggerNum,";
            }
            command += "Description,ProblemSnomedList,ProblemIcd9List,ProblemIcd10List,ProblemDefNumList,MedicationNumList,RxCuiList,CvxList,AllergyDefNumList,DemographicsList,LabLoincList,VitalLoincList,Instructions,Bibliography,Cardinality) VALUES(";
            if (isRandomKeys || useExistingPK)
            {
                command += POut.Long(ehrTrigger.EhrTriggerNum) + ",";
            }
            command +=
                "'" + POut.String(ehrTrigger.Description) + "',"
                + DbHelper.ParamChar + "paramProblemSnomedList,"
                + DbHelper.ParamChar + "paramProblemIcd9List,"
                + DbHelper.ParamChar + "paramProblemIcd10List,"
                + DbHelper.ParamChar + "paramProblemDefNumList,"
                + DbHelper.ParamChar + "paramMedicationNumList,"
                + DbHelper.ParamChar + "paramRxCuiList,"
                + DbHelper.ParamChar + "paramCvxList,"
                + DbHelper.ParamChar + "paramAllergyDefNumList,"
                + DbHelper.ParamChar + "paramDemographicsList,"
                + DbHelper.ParamChar + "paramLabLoincList,"
                + DbHelper.ParamChar + "paramVitalLoincList,"
                + DbHelper.ParamChar + "paramInstructions,"
                + DbHelper.ParamChar + "paramBibliography,"
                + POut.Int((int)ehrTrigger.Cardinality) + ")";
            if (ehrTrigger.ProblemSnomedList == null)
            {
                ehrTrigger.ProblemSnomedList = "";
            }
            OdSqlParameter paramProblemSnomedList = new OdSqlParameter("paramProblemSnomedList", OdDbType.Text, POut.StringParam(ehrTrigger.ProblemSnomedList));

            if (ehrTrigger.ProblemIcd9List == null)
            {
                ehrTrigger.ProblemIcd9List = "";
            }
            OdSqlParameter paramProblemIcd9List = new OdSqlParameter("paramProblemIcd9List", OdDbType.Text, POut.StringParam(ehrTrigger.ProblemIcd9List));

            if (ehrTrigger.ProblemIcd10List == null)
            {
                ehrTrigger.ProblemIcd10List = "";
            }
            OdSqlParameter paramProblemIcd10List = new OdSqlParameter("paramProblemIcd10List", OdDbType.Text, POut.StringParam(ehrTrigger.ProblemIcd10List));

            if (ehrTrigger.ProblemDefNumList == null)
            {
                ehrTrigger.ProblemDefNumList = "";
            }
            OdSqlParameter paramProblemDefNumList = new OdSqlParameter("paramProblemDefNumList", OdDbType.Text, POut.StringParam(ehrTrigger.ProblemDefNumList));

            if (ehrTrigger.MedicationNumList == null)
            {
                ehrTrigger.MedicationNumList = "";
            }
            OdSqlParameter paramMedicationNumList = new OdSqlParameter("paramMedicationNumList", OdDbType.Text, POut.StringParam(ehrTrigger.MedicationNumList));

            if (ehrTrigger.RxCuiList == null)
            {
                ehrTrigger.RxCuiList = "";
            }
            OdSqlParameter paramRxCuiList = new OdSqlParameter("paramRxCuiList", OdDbType.Text, POut.StringParam(ehrTrigger.RxCuiList));

            if (ehrTrigger.CvxList == null)
            {
                ehrTrigger.CvxList = "";
            }
            OdSqlParameter paramCvxList = new OdSqlParameter("paramCvxList", OdDbType.Text, POut.StringParam(ehrTrigger.CvxList));

            if (ehrTrigger.AllergyDefNumList == null)
            {
                ehrTrigger.AllergyDefNumList = "";
            }
            OdSqlParameter paramAllergyDefNumList = new OdSqlParameter("paramAllergyDefNumList", OdDbType.Text, POut.StringParam(ehrTrigger.AllergyDefNumList));

            if (ehrTrigger.DemographicsList == null)
            {
                ehrTrigger.DemographicsList = "";
            }
            OdSqlParameter paramDemographicsList = new OdSqlParameter("paramDemographicsList", OdDbType.Text, POut.StringParam(ehrTrigger.DemographicsList));

            if (ehrTrigger.LabLoincList == null)
            {
                ehrTrigger.LabLoincList = "";
            }
            OdSqlParameter paramLabLoincList = new OdSqlParameter("paramLabLoincList", OdDbType.Text, POut.StringParam(ehrTrigger.LabLoincList));

            if (ehrTrigger.VitalLoincList == null)
            {
                ehrTrigger.VitalLoincList = "";
            }
            OdSqlParameter paramVitalLoincList = new OdSqlParameter("paramVitalLoincList", OdDbType.Text, POut.StringParam(ehrTrigger.VitalLoincList));

            if (ehrTrigger.Instructions == null)
            {
                ehrTrigger.Instructions = "";
            }
            OdSqlParameter paramInstructions = new OdSqlParameter("paramInstructions", OdDbType.Text, POut.StringParam(ehrTrigger.Instructions));

            if (ehrTrigger.Bibliography == null)
            {
                ehrTrigger.Bibliography = "";
            }
            OdSqlParameter paramBibliography = new OdSqlParameter("paramBibliography", OdDbType.Text, POut.StringParam(ehrTrigger.Bibliography));

            if (useExistingPK || isRandomKeys)
            {
                Db.NonQ(command, paramProblemSnomedList, paramProblemIcd9List, paramProblemIcd10List, paramProblemDefNumList, paramMedicationNumList, paramRxCuiList, paramCvxList, paramAllergyDefNumList, paramDemographicsList, paramLabLoincList, paramVitalLoincList, paramInstructions, paramBibliography);
            }
            else
            {
                ehrTrigger.EhrTriggerNum = Db.NonQ(command, true, "EhrTriggerNum", "ehrTrigger", paramProblemSnomedList, paramProblemIcd9List, paramProblemIcd10List, paramProblemDefNumList, paramMedicationNumList, paramRxCuiList, paramCvxList, paramAllergyDefNumList, paramDemographicsList, paramLabLoincList, paramVitalLoincList, paramInstructions, paramBibliography);
            }
            return(ehrTrigger.EhrTriggerNum);
        }
Example #16
0
 private void OnConfirmDeleteButtonClicked(SavedGamePanel savedGame)
 {
     savedGame.Destroy();
     _storedGames.Remove(savedGame.StoredGame);
     Prefs.SetStoredGames(_storedGames);
 }
Example #17
0
        ///<summary>Inserts one Statement into the database.  Provides option to use the existing priKey.  Doesn't use the cache.</summary>
        public static long InsertNoCache(Statement statement, bool useExistingPK)
        {
            bool   isRandomKeys = Prefs.GetBoolNoCache(PrefName.RandomPrimaryKeys);
            string command      = "INSERT INTO statement (";

            if (!useExistingPK && isRandomKeys)
            {
                statement.StatementNum = ReplicationServers.GetKeyNoCache("statement", "StatementNum");
            }
            if (isRandomKeys || useExistingPK)
            {
                command += "StatementNum,";
            }
            command += "PatNum,SuperFamily,DateSent,DateRangeFrom,DateRangeTo,Note,NoteBold,Mode_,HidePayment,SinglePatient,Intermingled,IsSent,DocNum,IsReceipt,IsInvoice,IsInvoiceCopy,EmailSubject,EmailBody,IsBalValid,InsEst,BalTotal,StatementType,ShortGUID,StatementURL,StatementShortURL,SmsSendStatus) VALUES(";
            if (isRandomKeys || useExistingPK)
            {
                command += POut.Long(statement.StatementNum) + ",";
            }
            command +=
                POut.Long(statement.PatNum) + ","
                + POut.Long(statement.SuperFamily) + ","
                + POut.Date(statement.DateSent) + ","
                + POut.Date(statement.DateRangeFrom) + ","
                + POut.Date(statement.DateRangeTo) + ","
                + DbHelper.ParamChar + "paramNote,"
                + DbHelper.ParamChar + "paramNoteBold,"
                + POut.Int((int)statement.Mode_) + ","
                + POut.Bool(statement.HidePayment) + ","
                + POut.Bool(statement.SinglePatient) + ","
                + POut.Bool(statement.Intermingled) + ","
                + POut.Bool(statement.IsSent) + ","
                + POut.Long(statement.DocNum) + ","
                //DateTStamp can only be set by MySQL
                + POut.Bool(statement.IsReceipt) + ","
                + POut.Bool(statement.IsInvoice) + ","
                + POut.Bool(statement.IsInvoiceCopy) + ","
                + "'" + POut.String(statement.EmailSubject) + "',"
                + DbHelper.ParamChar + "paramEmailBody,"
                + POut.Bool(statement.IsBalValid) + ","
                + "'" + POut.Double(statement.InsEst) + "',"
                + "'" + POut.Double(statement.BalTotal) + "',"
                + "'" + POut.String(statement.StatementType.ToString()) + "',"
                + "'" + POut.String(statement.ShortGUID) + "',"
                + "'" + POut.String(statement.StatementURL) + "',"
                + "'" + POut.String(statement.StatementShortURL) + "',"
                + POut.Int((int)statement.SmsSendStatus) + ")";
            if (statement.Note == null)
            {
                statement.Note = "";
            }
            OdSqlParameter paramNote = new OdSqlParameter("paramNote", OdDbType.Text, POut.StringParam(statement.Note));

            if (statement.NoteBold == null)
            {
                statement.NoteBold = "";
            }
            OdSqlParameter paramNoteBold = new OdSqlParameter("paramNoteBold", OdDbType.Text, POut.StringParam(statement.NoteBold));

            if (statement.EmailBody == null)
            {
                statement.EmailBody = "";
            }
            OdSqlParameter paramEmailBody = new OdSqlParameter("paramEmailBody", OdDbType.Text, POut.StringParam(statement.EmailBody));

            if (useExistingPK || isRandomKeys)
            {
                Db.NonQ(command, paramNote, paramNoteBold, paramEmailBody);
            }
            else
            {
                statement.StatementNum = Db.NonQ(command, true, "StatementNum", "statement", paramNote, paramNoteBold, paramEmailBody);
            }
            return(statement.StatementNum);
        }
Example #18
0
        ///<summary>Inserts one AsapComm into the database.  Provides option to use the existing priKey.  Doesn't use the cache.</summary>
        public static long InsertNoCache(AsapComm asapComm, bool useExistingPK)
        {
            bool   isRandomKeys = Prefs.GetBoolNoCache(PrefName.RandomPrimaryKeys);
            string command      = "INSERT INTO asapcomm (";

            if (!useExistingPK && isRandomKeys)
            {
                asapComm.AsapCommNum = ReplicationServers.GetKeyNoCache("asapcomm", "AsapCommNum");
            }
            if (isRandomKeys || useExistingPK)
            {
                command += "AsapCommNum,";
            }
            command += "FKey,FKeyType,ScheduleNum,PatNum,ClinicNum,ShortGUID,DateTimeEntry,DateTimeExpire,DateTimeSmsScheduled,SmsSendStatus,EmailSendStatus,DateTimeSmsSent,DateTimeEmailSent,EmailMessageNum,ResponseStatus,DateTimeOrig,TemplateText,TemplateEmail,TemplateEmailSubj,Note,GuidMessageToMobile) VALUES(";
            if (isRandomKeys || useExistingPK)
            {
                command += POut.Long(asapComm.AsapCommNum) + ",";
            }
            command +=
                POut.Long(asapComm.FKey) + ","
                + POut.Int((int)asapComm.FKeyType) + ","
                + POut.Long(asapComm.ScheduleNum) + ","
                + POut.Long(asapComm.PatNum) + ","
                + POut.Long(asapComm.ClinicNum) + ","
                + "'" + POut.String(asapComm.ShortGUID) + "',"
                + DbHelper.Now() + ","
                + POut.DateT(asapComm.DateTimeExpire) + ","
                + POut.DateT(asapComm.DateTimeSmsScheduled) + ","
                + POut.Int((int)asapComm.SmsSendStatus) + ","
                + POut.Int((int)asapComm.EmailSendStatus) + ","
                + POut.DateT(asapComm.DateTimeSmsSent) + ","
                + POut.DateT(asapComm.DateTimeEmailSent) + ","
                + POut.Long(asapComm.EmailMessageNum) + ","
                + POut.Int((int)asapComm.ResponseStatus) + ","
                + POut.DateT(asapComm.DateTimeOrig) + ","
                + DbHelper.ParamChar + "paramTemplateText,"
                + DbHelper.ParamChar + "paramTemplateEmail,"
                + "'" + POut.String(asapComm.TemplateEmailSubj) + "',"
                + DbHelper.ParamChar + "paramNote,"
                + DbHelper.ParamChar + "paramGuidMessageToMobile)";
            if (asapComm.TemplateText == null)
            {
                asapComm.TemplateText = "";
            }
            OdSqlParameter paramTemplateText = new OdSqlParameter("paramTemplateText", OdDbType.Text, POut.StringParam(asapComm.TemplateText));

            if (asapComm.TemplateEmail == null)
            {
                asapComm.TemplateEmail = "";
            }
            OdSqlParameter paramTemplateEmail = new OdSqlParameter("paramTemplateEmail", OdDbType.Text, POut.StringParam(asapComm.TemplateEmail));

            if (asapComm.Note == null)
            {
                asapComm.Note = "";
            }
            OdSqlParameter paramNote = new OdSqlParameter("paramNote", OdDbType.Text, POut.StringParam(asapComm.Note));

            if (asapComm.GuidMessageToMobile == null)
            {
                asapComm.GuidMessageToMobile = "";
            }
            OdSqlParameter paramGuidMessageToMobile = new OdSqlParameter("paramGuidMessageToMobile", OdDbType.Text, POut.StringParam(asapComm.GuidMessageToMobile));

            if (useExistingPK || isRandomKeys)
            {
                Db.NonQ(command, paramTemplateText, paramTemplateEmail, paramNote, paramGuidMessageToMobile);
            }
            else
            {
                asapComm.AsapCommNum = Db.NonQ(command, true, "AsapCommNum", "asapComm", paramTemplateText, paramTemplateEmail, paramNote, paramGuidMessageToMobile);
            }
            return(asapComm.AsapCommNum);
        }
Example #19
0
        ///<summary>Inserts one SheetFieldDef into the database.  Provides option to use the existing priKey.  Doesn't use the cache.</summary>
        public static long InsertNoCache(SheetFieldDef sheetFieldDef, bool useExistingPK)
        {
            bool   isRandomKeys = Prefs.GetBoolNoCache(PrefName.RandomPrimaryKeys);
            string command      = "INSERT INTO sheetfielddef (";

            if (!useExistingPK && isRandomKeys)
            {
                sheetFieldDef.SheetFieldDefNum = ReplicationServers.GetKeyNoCache("sheetfielddef", "SheetFieldDefNum");
            }
            if (isRandomKeys || useExistingPK)
            {
                command += "SheetFieldDefNum,";
            }
            command += "SheetDefNum,FieldType,FieldName,FieldValue,FontSize,FontName,FontIsBold,XPos,YPos,Width,Height,GrowthBehavior,RadioButtonValue,RadioButtonGroup,IsRequired,TabOrder,ReportableName,TextAlign,IsPaymentOption,IsLocked,ItemColor,TabOrderMobile,UiLabelMobile,UiLabelMobileRadioButton,LayoutMode) VALUES(";
            if (isRandomKeys || useExistingPK)
            {
                command += POut.Long(sheetFieldDef.SheetFieldDefNum) + ",";
            }
            command +=
                POut.Long(sheetFieldDef.SheetDefNum) + ","
                + POut.Int((int)sheetFieldDef.FieldType) + ","
                + "'" + POut.String(sheetFieldDef.FieldName) + "',"
                + DbHelper.ParamChar + "paramFieldValue,"
                + POut.Float(sheetFieldDef.FontSize) + ","
                + "'" + POut.String(sheetFieldDef.FontName) + "',"
                + POut.Bool(sheetFieldDef.FontIsBold) + ","
                + POut.Int(sheetFieldDef.XPos) + ","
                + POut.Int(sheetFieldDef.YPos) + ","
                + POut.Int(sheetFieldDef.Width) + ","
                + POut.Int(sheetFieldDef.Height) + ","
                + POut.Int((int)sheetFieldDef.GrowthBehavior) + ","
                + "'" + POut.String(sheetFieldDef.RadioButtonValue) + "',"
                + "'" + POut.String(sheetFieldDef.RadioButtonGroup) + "',"
                + POut.Bool(sheetFieldDef.IsRequired) + ","
                + POut.Int(sheetFieldDef.TabOrder) + ","
                + "'" + POut.String(sheetFieldDef.ReportableName) + "',"
                + POut.Int((int)sheetFieldDef.TextAlign) + ","
                + POut.Bool(sheetFieldDef.IsPaymentOption) + ","
                + POut.Bool(sheetFieldDef.IsLocked) + ","
                + POut.Int(sheetFieldDef.ItemColor.ToArgb()) + ","
                + POut.Int(sheetFieldDef.TabOrderMobile) + ","
                + DbHelper.ParamChar + "paramUiLabelMobile,"
                + DbHelper.ParamChar + "paramUiLabelMobileRadioButton,"
                + POut.Int((int)sheetFieldDef.LayoutMode) + ")";
            if (sheetFieldDef.FieldValue == null)
            {
                sheetFieldDef.FieldValue = "";
            }
            OdSqlParameter paramFieldValue = new OdSqlParameter("paramFieldValue", OdDbType.Text, POut.StringParam(sheetFieldDef.FieldValue));

            if (sheetFieldDef.UiLabelMobile == null)
            {
                sheetFieldDef.UiLabelMobile = "";
            }
            OdSqlParameter paramUiLabelMobile = new OdSqlParameter("paramUiLabelMobile", OdDbType.Text, POut.StringParam(sheetFieldDef.UiLabelMobile));

            if (sheetFieldDef.UiLabelMobileRadioButton == null)
            {
                sheetFieldDef.UiLabelMobileRadioButton = "";
            }
            OdSqlParameter paramUiLabelMobileRadioButton = new OdSqlParameter("paramUiLabelMobileRadioButton", OdDbType.Text, POut.StringParam(sheetFieldDef.UiLabelMobileRadioButton));

            if (useExistingPK || isRandomKeys)
            {
                Db.NonQ(command, paramFieldValue, paramUiLabelMobile, paramUiLabelMobileRadioButton);
            }
            else
            {
                sheetFieldDef.SheetFieldDefNum = Db.NonQ(command, true, "SheetFieldDefNum", "sheetFieldDef", paramFieldValue, paramUiLabelMobile, paramUiLabelMobileRadioButton);
            }
            return(sheetFieldDef.SheetFieldDefNum);
        }
Example #20
0
        ///<summary>Inserts one ProcedureCode into the database.  Provides option to use the existing priKey.  Doesn't use the cache.</summary>
        public static long InsertNoCache(ProcedureCode procedureCode, bool useExistingPK)
        {
            bool   isRandomKeys = Prefs.GetBoolNoCache(PrefName.RandomPrimaryKeys);
            string command      = "INSERT INTO procedurecode (";

            if (!useExistingPK && isRandomKeys)
            {
                procedureCode.CodeNum = ReplicationServers.GetKeyNoCache("procedurecode", "CodeNum");
            }
            if (isRandomKeys || useExistingPK)
            {
                command += "CodeNum,";
            }
            command += "ProcCode,Descript,AbbrDesc,ProcTime,ProcCat,TreatArea,NoBillIns,IsProsth,DefaultNote,IsHygiene,GTypeNum,AlternateCode1,MedicalCode,IsTaxed,PaintType,GraphicColor,LaymanTerm,IsCanadianLab,PreExisting,BaseUnits,SubstitutionCode,SubstOnlyIf,IsMultiVisit,DrugNDC,RevenueCodeDefault,ProvNumDefault,CanadaTimeUnits,IsRadiology,DefaultClaimNote,DefaultTPNote,BypassGlobalLock,TaxCode) VALUES(";
            if (isRandomKeys || useExistingPK)
            {
                command += POut.Long(procedureCode.CodeNum) + ",";
            }
            command +=
                "'" + POut.String(procedureCode.ProcCode) + "',"
                + "'" + POut.String(procedureCode.Descript) + "',"
                + "'" + POut.String(procedureCode.AbbrDesc) + "',"
                + "'" + POut.String(procedureCode.ProcTime) + "',"
                + POut.Long(procedureCode.ProcCat) + ","
                + POut.Int((int)procedureCode.TreatArea) + ","
                + POut.Bool(procedureCode.NoBillIns) + ","
                + POut.Bool(procedureCode.IsProsth) + ","
                + DbHelper.ParamChar + "paramDefaultNote,"
                + POut.Bool(procedureCode.IsHygiene) + ","
                + POut.Int(procedureCode.GTypeNum) + ","
                + "'" + POut.String(procedureCode.AlternateCode1) + "',"
                + "'" + POut.String(procedureCode.MedicalCode) + "',"
                + POut.Bool(procedureCode.IsTaxed) + ","
                + POut.Int((int)procedureCode.PaintType) + ","
                + POut.Int(procedureCode.GraphicColor.ToArgb()) + ","
                + "'" + POut.String(procedureCode.LaymanTerm) + "',"
                + POut.Bool(procedureCode.IsCanadianLab) + ","
                + POut.Bool(procedureCode.PreExisting) + ","
                + POut.Int(procedureCode.BaseUnits) + ","
                + "'" + POut.String(procedureCode.SubstitutionCode) + "',"
                + POut.Int((int)procedureCode.SubstOnlyIf) + ","
                //DateTStamp can only be set by MySQL
                + POut.Bool(procedureCode.IsMultiVisit) + ","
                + "'" + POut.String(procedureCode.DrugNDC) + "',"
                + "'" + POut.String(procedureCode.RevenueCodeDefault) + "',"
                + POut.Long(procedureCode.ProvNumDefault) + ","
                + "'" + POut.Double(procedureCode.CanadaTimeUnits) + "',"
                + POut.Bool(procedureCode.IsRadiology) + ","
                + DbHelper.ParamChar + "paramDefaultClaimNote,"
                + DbHelper.ParamChar + "paramDefaultTPNote,"
                + POut.Int((int)procedureCode.BypassGlobalLock) + ","
                + "'" + POut.String(procedureCode.TaxCode) + "')";
            if (procedureCode.DefaultNote == null)
            {
                procedureCode.DefaultNote = "";
            }
            OdSqlParameter paramDefaultNote = new OdSqlParameter("paramDefaultNote", OdDbType.Text, POut.StringParam(procedureCode.DefaultNote));

            if (procedureCode.DefaultClaimNote == null)
            {
                procedureCode.DefaultClaimNote = "";
            }
            OdSqlParameter paramDefaultClaimNote = new OdSqlParameter("paramDefaultClaimNote", OdDbType.Text, POut.StringParam(procedureCode.DefaultClaimNote));

            if (procedureCode.DefaultTPNote == null)
            {
                procedureCode.DefaultTPNote = "";
            }
            OdSqlParameter paramDefaultTPNote = new OdSqlParameter("paramDefaultTPNote", OdDbType.Text, POut.StringParam(procedureCode.DefaultTPNote));

            if (useExistingPK || isRandomKeys)
            {
                Db.NonQ(command, paramDefaultNote, paramDefaultClaimNote, paramDefaultTPNote);
            }
            else
            {
                procedureCode.CodeNum = Db.NonQ(command, true, "CodeNum", "procedureCode", paramDefaultNote, paramDefaultClaimNote, paramDefaultTPNote);
            }
            return(procedureCode.CodeNum);
        }
 internal void <> m__0()
 {
     LanguageDatabase.SelectLanguage(this.localLang);
     Prefs.Save();
 }
Example #22
0
 public void resetToken()
 {
     Prefs prefs = new Prefs();
     prefs.setToken("");
 }
		protected virtual void ClearPrefs() {
			prefs = new Prefs();
		}
Example #24
0
        ///<summary>Inserts one Appointment into the database.  Provides option to use the existing priKey.  Doesn't use the cache.</summary>
        public static long InsertNoCache(Appointment appointment, bool useExistingPK)
        {
            bool   isRandomKeys = Prefs.GetBoolNoCache(PrefName.RandomPrimaryKeys);
            string command      = "INSERT INTO appointment (";

            if (!useExistingPK && isRandomKeys)
            {
                appointment.AptNum = ReplicationServers.GetKeyNoCache("appointment", "AptNum");
            }
            if (isRandomKeys || useExistingPK)
            {
                command += "AptNum,";
            }
            command += "PatNum,AptStatus,Pattern,Confirmed,TimeLocked,Op,Note,ProvNum,ProvHyg,AptDateTime,NextAptNum,UnschedStatus,IsNewPatient,ProcDescript,Assistant,ClinicNum,IsHygiene,DateTimeArrived,DateTimeSeated,DateTimeDismissed,InsPlan1,InsPlan2,DateTimeAskedToArrive,ProcsColored,ColorOverride,AppointmentTypeNum,SecUserNumEntry,SecDateEntry,Priority) VALUES(";
            if (isRandomKeys || useExistingPK)
            {
                command += POut.Long(appointment.AptNum) + ",";
            }
            command +=
                POut.Long(appointment.PatNum) + ","
                + POut.Int((int)appointment.AptStatus) + ","
                + "'" + POut.String(appointment.Pattern) + "',"
                + POut.Long(appointment.Confirmed) + ","
                + POut.Bool(appointment.TimeLocked) + ","
                + POut.Long(appointment.Op) + ","
                + DbHelper.ParamChar + "paramNote,"
                + POut.Long(appointment.ProvNum) + ","
                + POut.Long(appointment.ProvHyg) + ","
                + POut.DateT(appointment.AptDateTime) + ","
                + POut.Long(appointment.NextAptNum) + ","
                + POut.Long(appointment.UnschedStatus) + ","
                + POut.Bool(appointment.IsNewPatient) + ","
                + "'" + POut.String(appointment.ProcDescript) + "',"
                + POut.Long(appointment.Assistant) + ","
                + POut.Long(appointment.ClinicNum) + ","
                + POut.Bool(appointment.IsHygiene) + ","
                //DateTStamp can only be set by MySQL
                + POut.DateT(appointment.DateTimeArrived) + ","
                + POut.DateT(appointment.DateTimeSeated) + ","
                + POut.DateT(appointment.DateTimeDismissed) + ","
                + POut.Long(appointment.InsPlan1) + ","
                + POut.Long(appointment.InsPlan2) + ","
                + POut.DateT(appointment.DateTimeAskedToArrive) + ","
                + DbHelper.ParamChar + "paramProcsColored,"
                + POut.Int(appointment.ColorOverride.ToArgb()) + ","
                + POut.Long(appointment.AppointmentTypeNum) + ","
                + POut.Long(appointment.SecUserNumEntry) + ","
                + DbHelper.Now() + ","
                + POut.Int((int)appointment.Priority) + ")";
            if (appointment.Note == null)
            {
                appointment.Note = "";
            }
            OdSqlParameter paramNote = new OdSqlParameter("paramNote", OdDbType.Text, POut.StringNote(appointment.Note));

            if (appointment.ProcsColored == null)
            {
                appointment.ProcsColored = "";
            }
            OdSqlParameter paramProcsColored = new OdSqlParameter("paramProcsColored", OdDbType.Text, POut.StringParam(appointment.ProcsColored));

            if (useExistingPK || isRandomKeys)
            {
                Db.NonQ(command, paramNote, paramProcsColored);
            }
            else
            {
                appointment.AptNum = Db.NonQ(command, true, "AptNum", "appointment", paramNote, paramProcsColored);
            }
            return(appointment.AptNum);
        }
Example #25
0
 private void OnClickedSaveButton()
 {
     Prefs.Save();
     gameObject.SetActive(false);
 }
Example #26
0
 public object GetSavedValue()
 {
     return(_parser[PropertyInfo.PropertyType](Prefs.GetString(Key)));
 }
Example #27
0
        ///<summary>Inserts one XWebResponse into the database.  Provides option to use the existing priKey.  Doesn't use the cache.</summary>
        public static long InsertNoCache(XWebResponse xWebResponse, bool useExistingPK)
        {
            bool   isRandomKeys = Prefs.GetBoolNoCache(PrefName.RandomPrimaryKeys);
            string command      = "INSERT INTO xwebresponse (";

            if (!useExistingPK && isRandomKeys)
            {
                xWebResponse.XWebResponseNum = ReplicationServers.GetKeyNoCache("xwebresponse", "XWebResponseNum");
            }
            if (isRandomKeys || useExistingPK)
            {
                command += "XWebResponseNum,";
            }
            command += "PatNum,ProvNum,ClinicNum,PaymentNum,DateTEntry,DateTUpdate,TransactionStatus,ResponseCode,XWebResponseCode,ResponseDescription,OTK,HpfUrl,HpfExpiration,TransactionID,TransactionType,Alias,CardType,CardBrand,CardBrandShort,MaskedAcctNum,Amount,ApprovalCode,CardCodeResponse,ReceiptID,ExpDate,EntryMethod,ProcessorResponse,BatchNum,BatchAmount,AccountExpirationDate,DebugError,PayNote,CCSource,OrderId) VALUES(";
            if (isRandomKeys || useExistingPK)
            {
                command += POut.Long(xWebResponse.XWebResponseNum) + ",";
            }
            command +=
                POut.Long(xWebResponse.PatNum) + ","
                + POut.Long(xWebResponse.ProvNum) + ","
                + POut.Long(xWebResponse.ClinicNum) + ","
                + POut.Long(xWebResponse.PaymentNum) + ","
                + DbHelper.Now() + ","
                + POut.DateT(xWebResponse.DateTUpdate) + ","
                + POut.Int((int)xWebResponse.TransactionStatus) + ","
                + POut.Int(xWebResponse.ResponseCode) + ","
                + "'" + POut.String(xWebResponse.XWebResponseCode.ToString()) + "',"
                + "'" + POut.String(xWebResponse.ResponseDescription) + "',"
                + "'" + POut.String(xWebResponse.OTK) + "',"
                + DbHelper.ParamChar + "paramHpfUrl,"
                + POut.DateT(xWebResponse.HpfExpiration) + ","
                + "'" + POut.String(xWebResponse.TransactionID) + "',"
                + "'" + POut.String(xWebResponse.TransactionType) + "',"
                + "'" + POut.String(xWebResponse.Alias) + "',"
                + "'" + POut.String(xWebResponse.CardType) + "',"
                + "'" + POut.String(xWebResponse.CardBrand) + "',"
                + "'" + POut.String(xWebResponse.CardBrandShort) + "',"
                + "'" + POut.String(xWebResponse.MaskedAcctNum) + "',"
                + "'" + POut.Double(xWebResponse.Amount) + "',"
                + "'" + POut.String(xWebResponse.ApprovalCode) + "',"
                + "'" + POut.String(xWebResponse.CardCodeResponse) + "',"
                + POut.Int(xWebResponse.ReceiptID) + ","
                + "'" + POut.String(xWebResponse.ExpDate) + "',"
                + "'" + POut.String(xWebResponse.EntryMethod) + "',"
                + "'" + POut.String(xWebResponse.ProcessorResponse) + "',"
                + POut.Int(xWebResponse.BatchNum) + ","
                + "'" + POut.Double(xWebResponse.BatchAmount) + "',"
                + POut.Date(xWebResponse.AccountExpirationDate) + ","
                + DbHelper.ParamChar + "paramDebugError,"
                + DbHelper.ParamChar + "paramPayNote,"
                + POut.Int((int)xWebResponse.CCSource) + ","
                + "'" + POut.String(xWebResponse.OrderId) + "')";
            if (xWebResponse.HpfUrl == null)
            {
                xWebResponse.HpfUrl = "";
            }
            OdSqlParameter paramHpfUrl = new OdSqlParameter("paramHpfUrl", OdDbType.Text, POut.StringParam(xWebResponse.HpfUrl));

            if (xWebResponse.DebugError == null)
            {
                xWebResponse.DebugError = "";
            }
            OdSqlParameter paramDebugError = new OdSqlParameter("paramDebugError", OdDbType.Text, POut.StringParam(xWebResponse.DebugError));

            if (xWebResponse.PayNote == null)
            {
                xWebResponse.PayNote = "";
            }
            OdSqlParameter paramPayNote = new OdSqlParameter("paramPayNote", OdDbType.Text, POut.StringParam(xWebResponse.PayNote));

            if (useExistingPK || isRandomKeys)
            {
                Db.NonQ(command, paramHpfUrl, paramDebugError, paramPayNote);
            }
            else
            {
                xWebResponse.XWebResponseNum = Db.NonQ(command, true, "XWebResponseNum", "xWebResponse", paramHpfUrl, paramDebugError, paramPayNote);
            }
            return(xWebResponse.XWebResponseNum);
        }
Example #28
0
 public void Save()
 {
     Prefs.SetString(Key, GetPropertyValue().ToString());
 }
Example #29
0
        ///<summary>Inserts one EServiceBilling into the database.  Provides option to use the existing priKey.  Doesn't use the cache.</summary>
        public static long InsertNoCache(EServiceBilling eServiceBilling, bool useExistingPK)
        {
            bool   isRandomKeys = Prefs.GetBoolNoCache(PrefName.RandomPrimaryKeys);
            string command      = "INSERT INTO eservicebilling (";

            if (!useExistingPK && isRandomKeys)
            {
                eServiceBilling.EServiceBillingNum = ReplicationServers.GetKeyNoCache("eservicebilling", "EServiceBillingNum");
            }
            if (isRandomKeys || useExistingPK)
            {
                command += "EServiceBillingNum,";
            }
            command += "RegistrationKeyNum,CustPatNum,BillingCycleDay,DateTimeEntry,DateTimeProceduresPosted,DateOfBill,MonthOfBill,BillCycleStart,BillCycleEnd,UsageCycleStart,UsageCycleEnd,ProceduresJson,ChargesJson,NexmoInfoJson,LogInfo) VALUES(";
            if (isRandomKeys || useExistingPK)
            {
                command += POut.Long(eServiceBilling.EServiceBillingNum) + ",";
            }
            command +=
                POut.Long(eServiceBilling.RegistrationKeyNum) + ","
                + POut.Long(eServiceBilling.CustPatNum) + ","
                + POut.Int(eServiceBilling.BillingCycleDay) + ","
                + DbHelper.Now() + ","
                + POut.DateT(eServiceBilling.DateTimeProceduresPosted) + ","
                + POut.Date(eServiceBilling.DateOfBill) + ","
                + POut.Date(eServiceBilling.MonthOfBill) + ","
                + POut.Date(eServiceBilling.BillCycleStart) + ","
                + POut.Date(eServiceBilling.BillCycleEnd) + ","
                + POut.Date(eServiceBilling.UsageCycleStart) + ","
                + POut.Date(eServiceBilling.UsageCycleEnd) + ","
                + DbHelper.ParamChar + "paramProceduresJson,"
                + DbHelper.ParamChar + "paramChargesJson,"
                + DbHelper.ParamChar + "paramNexmoInfoJson,"
                + DbHelper.ParamChar + "paramLogInfo)";
            if (eServiceBilling.ProceduresJson == null)
            {
                eServiceBilling.ProceduresJson = "";
            }
            OdSqlParameter paramProceduresJson = new OdSqlParameter("paramProceduresJson", OdDbType.Text, POut.StringParam(eServiceBilling.ProceduresJson));

            if (eServiceBilling.ChargesJson == null)
            {
                eServiceBilling.ChargesJson = "";
            }
            OdSqlParameter paramChargesJson = new OdSqlParameter("paramChargesJson", OdDbType.Text, POut.StringParam(eServiceBilling.ChargesJson));

            if (eServiceBilling.NexmoInfoJson == null)
            {
                eServiceBilling.NexmoInfoJson = "";
            }
            OdSqlParameter paramNexmoInfoJson = new OdSqlParameter("paramNexmoInfoJson", OdDbType.Text, POut.StringParam(eServiceBilling.NexmoInfoJson));

            if (eServiceBilling.LogInfo == null)
            {
                eServiceBilling.LogInfo = "";
            }
            OdSqlParameter paramLogInfo = new OdSqlParameter("paramLogInfo", OdDbType.Text, POut.StringParam(eServiceBilling.LogInfo));

            if (useExistingPK || isRandomKeys)
            {
                Db.NonQ(command, paramProceduresJson, paramChargesJson, paramNexmoInfoJson, paramLogInfo);
            }
            else
            {
                eServiceBilling.EServiceBillingNum = Db.NonQ(command, true, "EServiceBillingNum", "eServiceBilling", paramProceduresJson, paramChargesJson, paramNexmoInfoJson, paramLogInfo);
            }
            return(eServiceBilling.EServiceBillingNum);
        }
Example #30
0
 internal void Delete()
 {
     Prefs.Delete(Key);
 }
Example #31
0
 public T GetSetting <T>(string setName, T def)
 {
     return(this._engine.Invoke <T>(() => Prefs.GetGameSetting(Program.GameEngine.Definition, setName, def)));
 }
        ///<summary>Inserts one Clearinghouse into the database.  Provides option to use the existing priKey.  Doesn't use the cache.</summary>
        public static long InsertNoCache(Clearinghouse clearinghouse, bool useExistingPK)
        {
            bool   isRandomKeys = Prefs.GetBoolNoCache(PrefName.RandomPrimaryKeys);
            string command      = "INSERT INTO clearinghouse (";

            if (!useExistingPK && isRandomKeys)
            {
                clearinghouse.ClearinghouseNum = ReplicationServers.GetKeyNoCache("clearinghouse", "ClearinghouseNum");
            }
            if (isRandomKeys || useExistingPK)
            {
                command += "ClearinghouseNum,";
            }
            command += "Description,ExportPath,Payors,Eformat,ISA05,SenderTIN,ISA07,ISA08,ISA15,Password,ResponsePath,CommBridge,ClientProgram,LastBatchNumber,ModemPort,LoginID,SenderName,SenderTelephone,GS03,ISA02,ISA04,ISA16,SeparatorData,SeparatorSegment,ClinicNum,HqClearinghouseNum,IsEraDownloadAllowed,IsClaimExportAllowed) VALUES(";
            if (isRandomKeys || useExistingPK)
            {
                command += POut.Long(clearinghouse.ClearinghouseNum) + ",";
            }
            command +=
                "'" + POut.String(clearinghouse.Description) + "',"
                + DbHelper.ParamChar + "paramExportPath,"
                + DbHelper.ParamChar + "paramPayors,"
                + POut.Int((int)clearinghouse.Eformat) + ","
                + "'" + POut.String(clearinghouse.ISA05) + "',"
                + "'" + POut.String(clearinghouse.SenderTIN) + "',"
                + "'" + POut.String(clearinghouse.ISA07) + "',"
                + "'" + POut.String(clearinghouse.ISA08) + "',"
                + "'" + POut.String(clearinghouse.ISA15) + "',"
                + "'" + POut.String(clearinghouse.Password) + "',"
                + "'" + POut.String(clearinghouse.ResponsePath) + "',"
                + POut.Int((int)clearinghouse.CommBridge) + ","
                + "'" + POut.String(clearinghouse.ClientProgram) + "',"
                + POut.Int(clearinghouse.LastBatchNumber) + ","
                + POut.Byte(clearinghouse.ModemPort) + ","
                + "'" + POut.String(clearinghouse.LoginID) + "',"
                + "'" + POut.String(clearinghouse.SenderName) + "',"
                + "'" + POut.String(clearinghouse.SenderTelephone) + "',"
                + "'" + POut.String(clearinghouse.GS03) + "',"
                + "'" + POut.String(clearinghouse.ISA02) + "',"
                + "'" + POut.String(clearinghouse.ISA04) + "',"
                + "'" + POut.String(clearinghouse.ISA16) + "',"
                + "'" + POut.String(clearinghouse.SeparatorData) + "',"
                + "'" + POut.String(clearinghouse.SeparatorSegment) + "',"
                + POut.Long(clearinghouse.ClinicNum) + ","
                + POut.Long(clearinghouse.HqClearinghouseNum) + ","
                + POut.Int((int)clearinghouse.IsEraDownloadAllowed) + ","
                + POut.Bool(clearinghouse.IsClaimExportAllowed) + ")";
            if (clearinghouse.ExportPath == null)
            {
                clearinghouse.ExportPath = "";
            }
            OdSqlParameter paramExportPath = new OdSqlParameter("paramExportPath", OdDbType.Text, POut.StringParam(clearinghouse.ExportPath));

            if (clearinghouse.Payors == null)
            {
                clearinghouse.Payors = "";
            }
            OdSqlParameter paramPayors = new OdSqlParameter("paramPayors", OdDbType.Text, POut.StringParam(clearinghouse.Payors));

            if (useExistingPK || isRandomKeys)
            {
                Db.NonQ(command, paramExportPath, paramPayors);
            }
            else
            {
                clearinghouse.ClearinghouseNum = Db.NonQ(command, true, "ClearinghouseNum", "clearinghouse", paramExportPath, paramPayors);
            }
            return(clearinghouse.ClearinghouseNum);
        }
Example #33
0
 /// <summary>
 /// Destroy our prefs object and close the form.
 /// </summary>
 private void CloseForm()
 {
     prefs = null;
     Close();
 }
Example #34
0
 private void OnWindowClosed(object sender, EventArgs e)
 {
     Prefs.SetGameSetting(Program.GameEngine.Definition, "sliderValue", (int)slider.Value);
 }
 private void ClearPrefs()
 {
     prefs = new Prefs();
 }
Example #36
0
        public SelectMultiCardsDlg(List <int> cardList, List <int> cardList2, string prompt, string title, int?minValue, int?maxValue, string boxLabel, string boxLabel2)
        {
            InitializeComponent();
            slider.Value   = Prefs.GetGameSetting(Program.GameEngine.Definition, "sliderValue", 175);
            Title          = title;
            this.Height    = Math.Min(System.Windows.SystemParameters.PrimaryScreenHeight * 0.80, 860);
            this.Width     = Math.Min(System.Windows.SystemParameters.PrimaryScreenWidth * 0.80, 860);
            promptLbl.Text = prompt;
            if (string.IsNullOrEmpty(prompt))
            {
                promptBox.Visibility = Visibility.Collapsed;
            }
            boxLbl.Text  = boxLabel;
            boxLbl2.Text = boxLabel2;

            Task.Factory.StartNew(() =>
            {
                if (cardList == null)
                {
                    cardList = new List <int>();
                }
                _min     = minValue;
                _max     = maxValue;
                allCards = cardList.ToList();
                if (cardList2 != null)
                {
                    allCards2 = cardList2.ToList();
                }


                Dispatcher.BeginInvoke(new Action(() =>
                {
                    allList.ItemsSource  = allCards;
                    allList2.ItemsSource = allCards2;
                    if (allCards2 != null) // multi-box will always have drag/drop
                    {
                        if (_max == null)
                        {
                            _max = allCards.Count + allCards2.Count; // max value will be the total count of both lists
                        }
                        if (_min == null)
                        {
                            _min = 0; // min value will be the lowest value possible
                        }
                        if (_min > _max)
                        {
                            _min = _max; // prevent oddities where user set the min value higher than max
                        }
                        AllowSelect = (_min <= allCards.Count && allCards.Count <= _max);
                    }
                    else // only one box, check if drag/drop is allowed
                    {
                        if (_max == null)
                        {
                            _max = 1;
                        }
                        if (_min == null)
                        {
                            _min = 1;
                        }
                        if (_min > _max)
                        {
                            _min = _max;                            // prevent oddities where user set the min value higher than max
                        }
                        allList2.Visibility = Visibility.Collapsed; // hides the second box
                        box2GridRow.Height  = new GridLength(0);    // hides the second box
                        if (_max <= 0)                              // a maximum value of 0 means that we want to reorganize the group, not select cards from it
                        {
                            selectButton.IsEnabled = true;
                            AllowSelect            = true;
                        }
                        else if (_min == 1 && _max == 1) // only allow a single choice
                        {
                            allList.PreviewMouseLeftButtonDown -= DragDropDown;
                            allList.SelectionChanged           += CardSelected;
                            allList.MouseDoubleClick           += SelectClicked; // double clicking the card will auto-confirm it
                        }
                        else //allow multiple choice
                        {
                            allList.PreviewMouseLeftButtonDown -= DragDropDown;
                            allList.SelectionChanged           += CardSelected;
                            allList.SelectionMode = SelectionMode.Multiple;
                            if (_min == 0)
                            {
                                AllowSelect = true;
                            }
                        }
                    }
                }));
            });
        }
 public static void Save(string key, Prefs prefs)
 {
     XmlSerializer xmlSerializer = new XmlSerializer(typeof(Prefs));
     StringWriter writer = new StringWriter();
     xmlSerializer.Serialize(writer, prefs);
     EditorPrefs.SetString(key, writer.ToString());
     EditorPrefs.SetString(ChatMapperExeKey, prefs.pathToChatMapperExe);
 }
        ///<summary>Inserts one ApptReminderRule into the database.  Provides option to use the existing priKey.  Doesn't use the cache.</summary>
        public static long InsertNoCache(ApptReminderRule apptReminderRule, bool useExistingPK)
        {
            bool   isRandomKeys = Prefs.GetBoolNoCache(PrefName.RandomPrimaryKeys);
            string command      = "INSERT INTO apptreminderrule (";

            if (!useExistingPK && isRandomKeys)
            {
                apptReminderRule.ApptReminderRuleNum = ReplicationServers.GetKeyNoCache("apptreminderrule", "ApptReminderRuleNum");
            }
            if (isRandomKeys || useExistingPK)
            {
                command += "ApptReminderRuleNum,";
            }
            command += "TypeCur,TSPrior,SendOrder,IsSendAll,TemplateSMS,TemplateEmailSubject,TemplateEmail,ClinicNum,TemplateSMSAggShared,TemplateSMSAggPerAppt,TemplateEmailSubjAggShared,TemplateEmailAggShared,TemplateEmailAggPerAppt,DoNotSendWithin) VALUES(";
            if (isRandomKeys || useExistingPK)
            {
                command += POut.Long(apptReminderRule.ApptReminderRuleNum) + ",";
            }
            command +=
                POut.Int((int)apptReminderRule.TypeCur) + ","
                + "'" + POut.Long(apptReminderRule.TSPrior.Ticks) + "',"
                + "'" + POut.String(apptReminderRule.SendOrder) + "',"
                + POut.Bool(apptReminderRule.IsSendAll) + ","
                + DbHelper.ParamChar + "paramTemplateSMS,"
                + DbHelper.ParamChar + "paramTemplateEmailSubject,"
                + DbHelper.ParamChar + "paramTemplateEmail,"
                + POut.Long(apptReminderRule.ClinicNum) + ","
                + DbHelper.ParamChar + "paramTemplateSMSAggShared,"
                + DbHelper.ParamChar + "paramTemplateSMSAggPerAppt,"
                + DbHelper.ParamChar + "paramTemplateEmailSubjAggShared,"
                + DbHelper.ParamChar + "paramTemplateEmailAggShared,"
                + DbHelper.ParamChar + "paramTemplateEmailAggPerAppt,"
                + "'" + POut.Long(apptReminderRule.DoNotSendWithin.Ticks) + "')";
            if (apptReminderRule.TemplateSMS == null)
            {
                apptReminderRule.TemplateSMS = "";
            }
            OdSqlParameter paramTemplateSMS = new OdSqlParameter("paramTemplateSMS", OdDbType.Text, POut.StringParam(apptReminderRule.TemplateSMS));

            if (apptReminderRule.TemplateEmailSubject == null)
            {
                apptReminderRule.TemplateEmailSubject = "";
            }
            OdSqlParameter paramTemplateEmailSubject = new OdSqlParameter("paramTemplateEmailSubject", OdDbType.Text, POut.StringParam(apptReminderRule.TemplateEmailSubject));

            if (apptReminderRule.TemplateEmail == null)
            {
                apptReminderRule.TemplateEmail = "";
            }
            OdSqlParameter paramTemplateEmail = new OdSqlParameter("paramTemplateEmail", OdDbType.Text, POut.StringParam(apptReminderRule.TemplateEmail));

            if (apptReminderRule.TemplateSMSAggShared == null)
            {
                apptReminderRule.TemplateSMSAggShared = "";
            }
            OdSqlParameter paramTemplateSMSAggShared = new OdSqlParameter("paramTemplateSMSAggShared", OdDbType.Text, POut.StringParam(apptReminderRule.TemplateSMSAggShared));

            if (apptReminderRule.TemplateSMSAggPerAppt == null)
            {
                apptReminderRule.TemplateSMSAggPerAppt = "";
            }
            OdSqlParameter paramTemplateSMSAggPerAppt = new OdSqlParameter("paramTemplateSMSAggPerAppt", OdDbType.Text, POut.StringParam(apptReminderRule.TemplateSMSAggPerAppt));

            if (apptReminderRule.TemplateEmailSubjAggShared == null)
            {
                apptReminderRule.TemplateEmailSubjAggShared = "";
            }
            OdSqlParameter paramTemplateEmailSubjAggShared = new OdSqlParameter("paramTemplateEmailSubjAggShared", OdDbType.Text, POut.StringParam(apptReminderRule.TemplateEmailSubjAggShared));

            if (apptReminderRule.TemplateEmailAggShared == null)
            {
                apptReminderRule.TemplateEmailAggShared = "";
            }
            OdSqlParameter paramTemplateEmailAggShared = new OdSqlParameter("paramTemplateEmailAggShared", OdDbType.Text, POut.StringParam(apptReminderRule.TemplateEmailAggShared));

            if (apptReminderRule.TemplateEmailAggPerAppt == null)
            {
                apptReminderRule.TemplateEmailAggPerAppt = "";
            }
            OdSqlParameter paramTemplateEmailAggPerAppt = new OdSqlParameter("paramTemplateEmailAggPerAppt", OdDbType.Text, POut.StringParam(apptReminderRule.TemplateEmailAggPerAppt));

            if (useExistingPK || isRandomKeys)
            {
                Db.NonQ(command, paramTemplateSMS, paramTemplateEmailSubject, paramTemplateEmail, paramTemplateSMSAggShared, paramTemplateSMSAggPerAppt, paramTemplateEmailSubjAggShared, paramTemplateEmailAggShared, paramTemplateEmailAggPerAppt);
            }
            else
            {
                apptReminderRule.ApptReminderRuleNum = Db.NonQ(command, true, "ApptReminderRuleNum", "apptReminderRule", paramTemplateSMS, paramTemplateEmailSubject, paramTemplateEmail, paramTemplateSMSAggShared, paramTemplateSMSAggPerAppt, paramTemplateEmailSubjAggShared, paramTemplateEmailAggShared, paramTemplateEmailAggPerAppt);
            }
            return(apptReminderRule.ApptReminderRuleNum);
        }
Example #39
0
 public string GetHeadName()
 {
     Prefs pref = new Prefs();
     return pref.GetPlayerName(pref.GetHeadToken());
 }
Example #40
0
File: Form1.cs Project: samgoat/NC
        public Form1()
        {
            InitializeComponent();
              cmbBook.Items.Add("Northern Caves 1 - Wharfdale & the North-East");
              cmbBook.Items.Add("Northern Caves 2 - The Three Peaks");
              cmbBook.Items.Add("Northern Caves 3 - The Three Counties System and the North West");
              cmbBook.Items.Add("Test");
              var serializer = new XmlSerializer(typeof(Prefs));
              if (File.Exists(SettingsFilePath))
            using (Stream stream = File.OpenRead(SettingsFilePath))
              prefs = (Prefs)serializer.Deserialize(stream);
              else
            prefs = new Prefs();
              txtFolder.Text = prefs.Folder;

              areaNumbers = new Dictionary<string, int>[bookCount];
              for (int i = 0; i < bookCount; i++)
            areaNumbers[i] = new Dictionary<string, int>();

              // Volume 3
              areaNumbers[Vol3].Add("Scales Moor", 40);
              areaNumbers[Vol3].Add("East Kingsdale", 15);
              areaNumbers[Vol3].Add("Kingsdale Head", 22);
              areaNumbers[Vol3].Add("West Kingsdale", 51);
              areaNumbers[Vol3].Add("Marble Steps", 28);
              areaNumbers[Vol3].Add("Leck Fell", 24);
              areaNumbers[Vol3].Add("Ease Gill", 14);
              areaNumbers[Vol3].Add("Barbondale", 4);
              areaNumbers[Vol3].Add("Dentdale", 13);
              areaNumbers[Vol3].Add("Garsdale and Great Knoutberry", 59);
              areaNumbers[Vol3].Add("Wild Boar Fell", 53);
              areaNumbers[Vol3].Add("Mallerstang", 27);
              areaNumbers[Vol3].Add("Brough", 7);
              areaNumbers[Vol3].Add("Vale of Eden", 48);
              areaNumbers[Vol3].Add("Bowland", 6);
              areaNumbers[Vol3].Add("Morecambe Bay", 29);
              areaNumbers[Vol3].Add("Other Areas", 35);

              // Volume 2
              areaNumbers[Vol2].Add("Malham", 26);
              areaNumbers[Vol2].Add("Stockdale", 41);
              areaNumbers[Vol2].Add("Attermire", 3);
              areaNumbers[Vol2].Add("Giggleswick Scar", 18);
              areaNumbers[Vol2].Add("Fountains Fell", 16);
              areaNumbers[Vol2].Add("Penyghent", 37);
              areaNumbers[Vol2].Add("Birkwith", 5);
              areaNumbers[Vol2].Add("Ribblehead", 39);
              areaNumbers[Vol2].Add("Alum Pot", 2);
              areaNumbers[Vol2].Add("Moughton", 30);
              areaNumbers[Vol2].Add("The Allotment", 45);
              areaNumbers[Vol2].Add("Gaping Gill", 17);
              areaNumbers[Vol2].Add("Newby Moss", 31);
              areaNumbers[Vol2].Add("White Scar", 52);
              areaNumbers[Vol2].Add("Chapel-Le-Dale", 9);
              areaNumbers[Vol2].Add("Park Fell", 36);
              areaNumbers[Vol2].Add("Bruntscar", 8);

              // Volume 1
              areaNumbers[Vol1].Add("Grassington", 19);
              areaNumbers[Vol1].Add("Great Whernside", 20);
              areaNumbers[Vol1].Add("Upper Wharfedale", 47);
              areaNumbers[Vol1].Add("Langstrothdale", 23);
              areaNumbers[Vol1].Add("Lower Littondale", 25);
              areaNumbers[Vol1].Add("Darnbrook and Cowside", 12);
              areaNumbers[Vol1].Add("Upper Littondale", 46);
              areaNumbers[Vol1].Add("Penyghent Gill", 38);
              areaNumbers[Vol1].Add("Cosh and Foxup", 10);
              areaNumbers[Vol1].Add("Stump Cross", 42);
              areaNumbers[Vol1].Add("Nidderdale", 32);
              areaNumbers[Vol1].Add("Coverdale and Bishopdale", 11);
              areaNumbers[Vol1].Add("Wensleydale", 50);
              areaNumbers[Vol1].Add("Swaledale and Arkengarthdale", 43);
              areaNumbers[Vol1].Add("Gretadale",21 );
              areaNumbers[Vol1].Add("Teesdale", 44);
              areaNumbers[Vol1].Add("Weardale", 49);
              areaNumbers[Vol1].Add("Alston", 1);
              areaNumbers[Vol1].Add("Northumberland", 34);
              areaNumbers[Vol1].Add("North York Moors", 33);
              areaNumbers[Vol1].Add("Other Caves", 55);

              // Moorland Caver
              //areaNumbers[MLC].Add("MLC - County Durham", 54);
              //areaNumbers[MLC].Add("MLC - Derbyshire and Nottinghamshire", 58);
              //areaNumbers[MLC].Add("MLC - North and West Yorkshire", 56);
              //areaNumbers[MLC].Add("MLC - South Yorkshire", 57);

              // Test
              areaNumbers[Test].Add("Test", 999);
        }
		protected virtual void LoadPrefs() {
			prefs = Prefs.Load(PrefsKey);
		}
Example #42
0
 // Use this for initialization
 void Start()
 {
     lowestScore = "A";
     scores = new Dictionary<string, int>();
     scores.Add("A", 0);
     scores.Add("B", 0);
     scores.Add("C", 0);
     scores.Add("D", 0);
     multipliers = new Dictionary<string, int>();
     multipliers.Add("A", 1);
     multipliers.Add("B", 1);
     multipliers.Add("C", 1);
     multipliers.Add("D", 1);
     multiplierForA.enabled = false;
     multiplierForB.enabled = false;
     multiplierForC.enabled = false;
     multiplierForD.enabled = false;
     sizers = new Dictionary<string, RectTransform>();
     sizers.Add("A", sizerA);
     sizers.Add("B", sizerB);
     sizers.Add("C", sizerC);
     sizers.Add("D", sizerD);
     prefs = GameObject.Find("Prefs").GetComponent<Prefs>();
 }
Example #43
0
 public override void PreClose()
 {
     base.PreClose();
     Prefs.Save();
 }
        ///<summary>Inserts one ConfirmationRequest into the database.  Provides option to use the existing priKey.  Doesn't use the cache.</summary>
        public static long InsertNoCache(ConfirmationRequest confirmationRequest, bool useExistingPK)
        {
            bool   isRandomKeys = Prefs.GetBoolNoCache(PrefName.RandomPrimaryKeys);
            string command      = "INSERT INTO confirmationrequest (";

            if (!useExistingPK && isRandomKeys)
            {
                confirmationRequest.ConfirmationRequestNum = ReplicationServers.GetKeyNoCache("confirmationrequest", "ConfirmationRequestNum");
            }
            if (isRandomKeys || useExistingPK)
            {
                command += "ConfirmationRequestNum,";
            }
            command += "ClinicNum,IsForSms,IsForEmail,PatNum,ApptNum,PhonePat,DateTimeConfirmExpire,SecondsFromEntryToExpire,ShortGUID,ConfirmCode,MsgTextToMobileTemplate,MsgTextToMobile,EmailSubjTemplate,EmailSubj,EmailTextTemplate,EmailText,DateTimeEntry,DateTimeConfirmTransmit,DateTimeRSVP,RSVPStatus,ResponseDescript,GuidMessageToMobile,GuidMessageFromMobile,ShortGuidEmail,AptDateTimeOrig,TSPrior) VALUES(";
            if (isRandomKeys || useExistingPK)
            {
                command += POut.Long(confirmationRequest.ConfirmationRequestNum) + ",";
            }
            command +=
                POut.Long(confirmationRequest.ClinicNum) + ","
                + POut.Bool(confirmationRequest.IsForSms) + ","
                + POut.Bool(confirmationRequest.IsForEmail) + ","
                + POut.Long(confirmationRequest.PatNum) + ","
                + POut.Long(confirmationRequest.ApptNum) + ","
                + "'" + POut.String(confirmationRequest.PhonePat) + "',"
                + POut.DateT(confirmationRequest.DateTimeConfirmExpire) + ","
                + POut.Int(confirmationRequest.SecondsFromEntryToExpire) + ","
                + "'" + POut.String(confirmationRequest.ShortGUID) + "',"
                + "'" + POut.String(confirmationRequest.ConfirmCode) + "',"
                + DbHelper.ParamChar + "paramMsgTextToMobileTemplate,"
                + DbHelper.ParamChar + "paramMsgTextToMobile,"
                + DbHelper.ParamChar + "paramEmailSubjTemplate,"
                + DbHelper.ParamChar + "paramEmailSubj,"
                + DbHelper.ParamChar + "paramEmailTextTemplate,"
                + DbHelper.ParamChar + "paramEmailText,"
                + DbHelper.Now() + ","
                + POut.DateT(confirmationRequest.DateTimeConfirmTransmit) + ","
                + POut.DateT(confirmationRequest.DateTimeRSVP) + ","
                + POut.Int((int)confirmationRequest.RSVPStatus) + ","
                + DbHelper.ParamChar + "paramResponseDescript,"
                + DbHelper.ParamChar + "paramGuidMessageToMobile,"
                + DbHelper.ParamChar + "paramGuidMessageFromMobile,"
                + "'" + POut.String(confirmationRequest.ShortGuidEmail) + "',"
                + POut.DateT(confirmationRequest.AptDateTimeOrig) + ","
                + "'" + POut.Long(confirmationRequest.TSPrior.Ticks) + "')";
            if (confirmationRequest.MsgTextToMobileTemplate == null)
            {
                confirmationRequest.MsgTextToMobileTemplate = "";
            }
            OdSqlParameter paramMsgTextToMobileTemplate = new OdSqlParameter("paramMsgTextToMobileTemplate", OdDbType.Text, POut.StringParam(confirmationRequest.MsgTextToMobileTemplate));

            if (confirmationRequest.MsgTextToMobile == null)
            {
                confirmationRequest.MsgTextToMobile = "";
            }
            OdSqlParameter paramMsgTextToMobile = new OdSqlParameter("paramMsgTextToMobile", OdDbType.Text, POut.StringParam(confirmationRequest.MsgTextToMobile));

            if (confirmationRequest.EmailSubjTemplate == null)
            {
                confirmationRequest.EmailSubjTemplate = "";
            }
            OdSqlParameter paramEmailSubjTemplate = new OdSqlParameter("paramEmailSubjTemplate", OdDbType.Text, POut.StringParam(confirmationRequest.EmailSubjTemplate));

            if (confirmationRequest.EmailSubj == null)
            {
                confirmationRequest.EmailSubj = "";
            }
            OdSqlParameter paramEmailSubj = new OdSqlParameter("paramEmailSubj", OdDbType.Text, POut.StringParam(confirmationRequest.EmailSubj));

            if (confirmationRequest.EmailTextTemplate == null)
            {
                confirmationRequest.EmailTextTemplate = "";
            }
            OdSqlParameter paramEmailTextTemplate = new OdSqlParameter("paramEmailTextTemplate", OdDbType.Text, POut.StringParam(confirmationRequest.EmailTextTemplate));

            if (confirmationRequest.EmailText == null)
            {
                confirmationRequest.EmailText = "";
            }
            OdSqlParameter paramEmailText = new OdSqlParameter("paramEmailText", OdDbType.Text, POut.StringParam(confirmationRequest.EmailText));

            if (confirmationRequest.ResponseDescript == null)
            {
                confirmationRequest.ResponseDescript = "";
            }
            OdSqlParameter paramResponseDescript = new OdSqlParameter("paramResponseDescript", OdDbType.Text, POut.StringParam(confirmationRequest.ResponseDescript));

            if (confirmationRequest.GuidMessageToMobile == null)
            {
                confirmationRequest.GuidMessageToMobile = "";
            }
            OdSqlParameter paramGuidMessageToMobile = new OdSqlParameter("paramGuidMessageToMobile", OdDbType.Text, POut.StringParam(confirmationRequest.GuidMessageToMobile));

            if (confirmationRequest.GuidMessageFromMobile == null)
            {
                confirmationRequest.GuidMessageFromMobile = "";
            }
            OdSqlParameter paramGuidMessageFromMobile = new OdSqlParameter("paramGuidMessageFromMobile", OdDbType.Text, POut.StringParam(confirmationRequest.GuidMessageFromMobile));

            if (useExistingPK || isRandomKeys)
            {
                Db.NonQ(command, paramMsgTextToMobileTemplate, paramMsgTextToMobile, paramEmailSubjTemplate, paramEmailSubj, paramEmailTextTemplate, paramEmailText, paramResponseDescript, paramGuidMessageToMobile, paramGuidMessageFromMobile);
            }
            else
            {
                confirmationRequest.ConfirmationRequestNum = Db.NonQ(command, true, "ConfirmationRequestNum", "confirmationRequest", paramMsgTextToMobileTemplate, paramMsgTextToMobile, paramEmailSubjTemplate, paramEmailSubj, paramEmailTextTemplate, paramEmailText, paramResponseDescript, paramGuidMessageToMobile, paramGuidMessageFromMobile);
            }
            return(confirmationRequest.ConfirmationRequestNum);
        }
 public void UpdateRoomStatus(JSONObject data)
 {
     Prefs pref = new Prefs();
     data.AddField("token", pref.getToken());
     data.AddField("stage", pref.getStage());
     Debug.Log("UpdateRoomStatus" + data.ToString());
     sendRequest(ServerAPI.RequestType.SetGameStatus, data);
 }
        public static void DoMainMenuControls(Rect rect, bool anyMapFiles)
        {
            GUI.BeginGroup(rect);
            Rect rect2 = new Rect(0f, 0f, 170f, rect.height);
            Rect rect3 = new Rect((float)(rect2.xMax + 17.0), 0f, 145f, rect.height);

            Text.Font = GameFont.Small;
            List <ListableOption> list = new List <ListableOption>();

            if (Current.ProgramState == ProgramState.Entry)
            {
                string label = "Tutorial".CanTranslate() ? "Tutorial".Translate() : "LearnToPlay".Translate();
                list.Add(new ListableOption(label, delegate
                {
                    MainMenuDrawer.InitLearnToPlay();
                }, null));
                list.Add(new ListableOption("NewColony".Translate(), delegate
                {
                    Find.WindowStack.Add(new Page_SelectScenario());
                }, null));
            }
            if (Current.ProgramState == ProgramState.Playing && !Current.Game.Info.permadeathMode)
            {
                list.Add(new ListableOption("Save".Translate(), delegate
                {
                    MainMenuDrawer.CloseMainTab();
                    Find.WindowStack.Add(new Dialog_SaveFileList_Save());
                }, null));
            }
            ListableOption item;

            if (anyMapFiles && (Current.ProgramState != ProgramState.Playing || !Current.Game.Info.permadeathMode))
            {
                item = new ListableOption("LoadGame".Translate(), delegate
                {
                    MainMenuDrawer.CloseMainTab();
                    Find.WindowStack.Add(new Dialog_SaveFileList_Load());
                }, null);
                list.Add(item);
            }
            if (Current.ProgramState == ProgramState.Playing)
            {
                list.Add(new ListableOption("ReviewScenario".Translate(), delegate
                {
                    WindowStack windowStack    = Find.WindowStack;
                    string fullInformationText = Find.Scenario.GetFullInformationText();
                    string name = Find.Scenario.name;
                    windowStack.Add(new Dialog_MessageBox(fullInformationText, null, null, null, null, name, false));
                }, null));
            }
            item = new ListableOption("Options".Translate(), delegate
            {
                MainMenuDrawer.CloseMainTab();
                Find.WindowStack.Add(new Dialog_Options());
            }, "MenuButton-Options");
            list.Add(item);
            if (Current.ProgramState == ProgramState.Entry)
            {
                item = new ListableOption("Mods".Translate(), delegate
                {
                    Find.WindowStack.Add(new Page_ModsConfig());
                }, null);
                list.Add(item);
                item = new ListableOption("Credits".Translate(), delegate
                {
                    Find.WindowStack.Add(new Screen_Credits());
                }, null);
                list.Add(item);
            }
            if (Current.ProgramState == ProgramState.Playing)
            {
                if (Current.Game.Info.permadeathMode)
                {
                    item = new ListableOption("SaveAndQuitToMainMenu".Translate(), delegate
                    {
                        LongEventHandler.QueueLongEvent(delegate
                        {
                            GameDataSaveLoader.SaveGame(Current.Game.Info.permadeathModeUniqueName);
                            MemoryUtility.ClearAllMapsAndWorld();
                        }, "Entry", "SavingLongEvent", false, null);
                    }, null);
                    list.Add(item);
                    item = new ListableOption("SaveAndQuitToOS".Translate(), delegate
                    {
                        LongEventHandler.QueueLongEvent(delegate
                        {
                            GameDataSaveLoader.SaveGame(Current.Game.Info.permadeathModeUniqueName);
                            LongEventHandler.ExecuteWhenFinished(delegate
                            {
                                Root.Shutdown();
                            });
                        }, "SavingLongEvent", false, null);
                    }, null);
                    list.Add(item);
                }
                else
                {
                    Action action = delegate
                    {
                        if (GameDataSaveLoader.CurrentGameStateIsValuable)
                        {
                            Find.WindowStack.Add(Dialog_MessageBox.CreateConfirmation("ConfirmQuit".Translate(), delegate
                            {
                                GenScene.GoToMainMenu();
                            }, true, null));
                        }
                        else
                        {
                            GenScene.GoToMainMenu();
                        }
                    };
                    item = new ListableOption("QuitToMainMenu".Translate(), action, null);
                    list.Add(item);
                    Action action2 = delegate
                    {
                        if (GameDataSaveLoader.CurrentGameStateIsValuable)
                        {
                            Find.WindowStack.Add(Dialog_MessageBox.CreateConfirmation("ConfirmQuit".Translate(), delegate
                            {
                                Root.Shutdown();
                            }, true, null));
                        }
                        else
                        {
                            Root.Shutdown();
                        }
                    };
                    item = new ListableOption("QuitToOS".Translate(), action2, null);
                    list.Add(item);
                }
            }
            else
            {
                item = new ListableOption("QuitToOS".Translate(), delegate
                {
                    Root.Shutdown();
                }, null);
                list.Add(item);
            }
            OptionListingUtility.DrawOptionListing(rect2, list);
            Text.Font = GameFont.Small;
            List <ListableOption> list2 = new List <ListableOption>();
            ListableOption        item2 = new ListableOption_WebLink("FictionPrimer".Translate(), "http://rimworldgame.com/backstory", TexButton.IconBlog);

            list2.Add(item2);
            item2 = new ListableOption_WebLink("LudeonBlog".Translate(), "http://ludeon.com/blog", TexButton.IconBlog);
            list2.Add(item2);
            item2 = new ListableOption_WebLink("Forums".Translate(), "http://ludeon.com/forums", TexButton.IconForums);
            list2.Add(item2);
            item2 = new ListableOption_WebLink("OfficialWiki".Translate(), "http://rimworldwiki.com", TexButton.IconBlog);
            list2.Add(item2);
            item2 = new ListableOption_WebLink("TynansTwitter".Translate(), "https://twitter.com/TynanSylvester", TexButton.IconTwitter);
            list2.Add(item2);
            item2 = new ListableOption_WebLink("TynansDesignBook".Translate(), "http://tynansylvester.com/book", TexButton.IconBook);
            list2.Add(item2);
            item2 = new ListableOption_WebLink("HelpTranslate".Translate(), "http://ludeon.com/forums/index.php?topic=2933.0", TexButton.IconForums);
            list2.Add(item2);
            item2 = new ListableOption_WebLink("BuySoundtrack".Translate(), "http://www.lasgameaudio.co.uk/#!store/t04fw", TexButton.IconSoundtrack);
            list2.Add(item2);
            float num = OptionListingUtility.DrawOptionListing(rect3, list2);

            GUI.BeginGroup(rect3);
            if (Current.ProgramState == ProgramState.Entry && Widgets.ButtonImage(new Rect(0f, (float)(num + 10.0), 64f, 32f), LanguageDatabase.activeLanguage.icon))
            {
                List <FloatMenuOption> list3 = new List <FloatMenuOption>();
                foreach (LoadedLanguage allLoadedLanguage in LanguageDatabase.AllLoadedLanguages)
                {
                    LoadedLanguage localLang = allLoadedLanguage;
                    list3.Add(new FloatMenuOption(localLang.FriendlyNameNative, delegate
                    {
                        LanguageDatabase.SelectLanguage(localLang);
                        Prefs.Save();
                    }, MenuOptionPriority.Default, null, null, 0f, null, null));
                }
                Find.WindowStack.Add(new FloatMenu(list3));
            }
            GUI.EndGroup();
            GUI.EndGroup();
        }
Example #47
0
 public string GetOwnName()
 {
     Prefs pref = new Prefs();
     return PlayerPrefs.GetString("playerName" + pref.getToken() , "NoNameHere!");
 }
        private void Process()
        {
            var sw = Stopwatch.StartNew();

            // Set successful Last Retrieval Time
            LastRetrievalTime = DateTime.Now;

            var options = _messages.Options;
            var info    = _messages.Info;

            _slotsLock.EnterReadLock();
            try
            {
                foreach (var slotModel in _slots)
                {
                    // Re-Init Slot Level Members Before Processing
                    slotModel.Initialize();

                    // Run the Aggregator
                    var dataAggregator = new FahClientDataAggregator {
                        Logger = Logger
                    };
                    dataAggregator.ClientName = slotModel.Name;
                    DataAggregatorResult result = dataAggregator.AggregateData(_fahLog.ClientRuns.LastOrDefault(),
                                                                               _messages.UnitCollection,
                                                                               info,
                                                                               options,
                                                                               slotModel.SlotOptions,
                                                                               slotModel.UnitInfo,
                                                                               slotModel.SlotId);
                    PopulateRunLevelData(result, info, slotModel);

                    slotModel.Queue           = result.Queue;
                    slotModel.CurrentLogLines = result.CurrentLogLines;
                    //slotModel.UnitLogLines = result.UnitLogLines;

                    var parsedUnits = new Dictionary <int, UnitInfoModel>(result.UnitInfos.Count);
                    foreach (int key in result.UnitInfos.Keys)
                    {
                        if (result.UnitInfos[key] != null)
                        {
                            parsedUnits[key] = BuildUnitInfoLogic(slotModel, result.UnitInfos[key]);
                        }
                    }

                    // *** THIS HAS TO BE DONE BEFORE UPDATING SlotModel.UnitInfoLogic ***
                    UpdateBenchmarkData(slotModel.UnitInfoModel, parsedUnits.Values, result.CurrentUnitIndex);

                    // Update the UnitInfoLogic if we have a current unit index
                    if (result.CurrentUnitIndex != -1 && parsedUnits.ContainsKey(result.CurrentUnitIndex))
                    {
                        slotModel.UnitInfoModel = parsedUnits[result.CurrentUnitIndex];
                    }

                    SetSlotStatus(slotModel);

                    slotModel.UnitInfoModel.ShowProductionTrace(Logger, slotModel.Name, slotModel.Status,
                                                                Prefs.Get <PpdCalculationType>(Preference.PpdCalculation),
                                                                Prefs.Get <BonusCalculationType>(Preference.BonusCalculation));

                    string statusMessage = String.Format(CultureInfo.CurrentCulture, "Slot Status: {0}", slotModel.Status);
                    Logger.InfoFormat(Constants.ClientNameFormat, slotModel.Name, statusMessage);
                }
            }
            finally
            {
                _slotsLock.ExitReadLock();
            }

            string message = String.Format(CultureInfo.CurrentCulture, "Retrieval finished: {0}", sw.GetExecTime());

            Logger.InfoFormat(Constants.ClientNameFormat, Settings.Name, message);
        }
Example #49
0
        void SaveSettingsTask(
            ref string dataDirectory,
            bool useLightChat,
            bool useHardwareRendering,
            bool useTransparentWindows,
            bool ignoreSSLCertificates,
            int maxChatHistory,
            bool enableChatImages,
            bool enableWhisperSound,
            bool enableNameSound,
            string windowSkin,
            bool tileWindowSkin,
            bool useWindowsForChat,
            int chatFontSize,
            bool useInstantSearch,
            bool enableGameSounds,
            Prefs.ZoomType zoomOption,
            Prefs.CardAnimType animOption,
            bool enableAdvancedOptions,
            bool useGameFonts,
            double handDensity,
            bool useTestReleases)
        {
            this.ValidateFields(
                ref dataDirectory,
                useLightChat,
                useHardwareRendering,
                useTransparentWindows,
                ignoreSSLCertificates,
                maxChatHistory,
                enableChatImages,
                enableWhisperSound,
                enableNameSound,
                windowSkin,
                tileWindowSkin,
                useWindowsForChat,
                chatFontSize,
                useInstantSearch,
                enableGameSounds,
                enableAdvancedOptions,
                useGameFonts,
                handDensity,
                useTestReleases
                );

            Prefs.DataDirectory = dataDirectory;
            Prefs.UseLightChat = useLightChat;
            Prefs.UseHardwareRendering = useHardwareRendering;
            Prefs.UseWindowTransparency = useTransparentWindows;
            Prefs.IgnoreSSLCertificates = ignoreSSLCertificates;
            Prefs.MaxChatHistory = maxChatHistory;
            Prefs.EnableChatImages = enableChatImages;
            Prefs.EnableWhisperSound = enableWhisperSound;
            Prefs.EnableNameSound = enableNameSound;
            Prefs.WindowSkin = windowSkin;
            Prefs.TileWindowSkin = tileWindowSkin;
            Prefs.UseWindowsForChat = useWindowsForChat;
            Prefs.ChatFontSize = chatFontSize;
            Prefs.InstantSearch = useInstantSearch;
            Prefs.EnableGameSound = enableGameSounds;
            Prefs.ZoomOption = zoomOption;
            Prefs.CardMoveNotification = animOption;
            Prefs.EnableAdvancedOptions = enableAdvancedOptions;
            Prefs.UseGameFonts = useGameFonts;
            Prefs.HandDensity = handDensity;
            if (useTestReleases && !File.Exists(Path.Combine(Config.Instance.Paths.ConfigDirectory, "TEST")))
                File.Create(Path.Combine(Config.Instance.Paths.ConfigDirectory, "TEST"));
            else if (!useTestReleases && File.Exists(Path.Combine(Config.Instance.Paths.ConfigDirectory, "TEST")))
                File.Delete(Path.Combine(Config.Instance.Paths.ConfigDirectory, "TEST"));
            //Prefs.EnableChatGifs = enableChatGifs;
        }
Example #50
0
        ///<summary>Inserts one Provider into the database.  Provides option to use the existing priKey.  Doesn't use the cache.</summary>
        public static long InsertNoCache(Provider provider, bool useExistingPK)
        {
            bool   isRandomKeys = Prefs.GetBoolNoCache(PrefName.RandomPrimaryKeys);
            string command      = "INSERT INTO provider (";

            if (!useExistingPK && isRandomKeys)
            {
                provider.ProvNum = ReplicationServers.GetKeyNoCache("provider", "ProvNum");
            }
            if (isRandomKeys || useExistingPK)
            {
                command += "ProvNum,";
            }
            command += "Abbr,ItemOrder,LName,FName,MI,Suffix,FeeSched,Specialty,SSN,StateLicense,DEANum,IsSecondary,ProvColor,IsHidden,UsingTIN,BlueCrossID,SigOnFile,MedicaidID,OutlineColor,SchoolClassNum,NationalProvID,CanadianOfficeNum,AnesthProvType,TaxonomyCodeOverride,IsCDAnet,EcwID,StateRxID,IsNotPerson,StateWhereLicensed,EmailAddressNum,IsInstructor,EhrMuStage,ProvNumBillingOverride,CustomID,ProvStatus,IsHiddenReport,IsErxEnabled,SchedNote,Birthdate,WebSchedDescript,WebSchedImageLocation,HourlyProdGoalAmt,DateTerm) VALUES(";
            if (isRandomKeys || useExistingPK)
            {
                command += POut.Long(provider.ProvNum) + ",";
            }
            command +=
                "'" + POut.String(provider.Abbr) + "',"
                + POut.Int(provider.ItemOrder) + ","
                + "'" + POut.String(provider.LName) + "',"
                + "'" + POut.String(provider.FName) + "',"
                + "'" + POut.String(provider.MI) + "',"
                + "'" + POut.String(provider.Suffix) + "',"
                + POut.Long(provider.FeeSched) + ","
                + POut.Long(provider.Specialty) + ","
                + "'" + POut.String(provider.SSN) + "',"
                + "'" + POut.String(provider.StateLicense) + "',"
                + "'" + POut.String(provider.DEANum) + "',"
                + POut.Bool(provider.IsSecondary) + ","
                + POut.Int(provider.ProvColor.ToArgb()) + ","
                + POut.Bool(provider.IsHidden) + ","
                + POut.Bool(provider.UsingTIN) + ","
                + "'" + POut.String(provider.BlueCrossID) + "',"
                + POut.Bool(provider.SigOnFile) + ","
                + "'" + POut.String(provider.MedicaidID) + "',"
                + POut.Int(provider.OutlineColor.ToArgb()) + ","
                + POut.Long(provider.SchoolClassNum) + ","
                + "'" + POut.String(provider.NationalProvID) + "',"
                + "'" + POut.String(provider.CanadianOfficeNum) + "',"
                //DateTStamp can only be set by MySQL
                + POut.Long(provider.AnesthProvType) + ","
                + "'" + POut.String(provider.TaxonomyCodeOverride) + "',"
                + POut.Bool(provider.IsCDAnet) + ","
                + "'" + POut.String(provider.EcwID) + "',"
                + "'" + POut.String(provider.StateRxID) + "',"
                + POut.Bool(provider.IsNotPerson) + ","
                + "'" + POut.String(provider.StateWhereLicensed) + "',"
                + POut.Long(provider.EmailAddressNum) + ","
                + POut.Bool(provider.IsInstructor) + ","
                + POut.Int(provider.EhrMuStage) + ","
                + POut.Long(provider.ProvNumBillingOverride) + ","
                + "'" + POut.String(provider.CustomID) + "',"
                + POut.Int((int)provider.ProvStatus) + ","
                + POut.Bool(provider.IsHiddenReport) + ","
                + POut.Int((int)provider.IsErxEnabled) + ","
                + "'" + POut.String(provider.SchedNote) + "',"
                + POut.Date(provider.Birthdate) + ","
                + DbHelper.ParamChar + "paramWebSchedDescript,"
                + "'" + POut.String(provider.WebSchedImageLocation) + "',"
                + "'" + POut.Double(provider.HourlyProdGoalAmt) + "',"
                + POut.Date(provider.DateTerm) + ")";
            if (provider.WebSchedDescript == null)
            {
                provider.WebSchedDescript = "";
            }
            OdSqlParameter paramWebSchedDescript = new OdSqlParameter("paramWebSchedDescript", OdDbType.Text, POut.StringParam(provider.WebSchedDescript));

            if (useExistingPK || isRandomKeys)
            {
                Db.NonQ(command, paramWebSchedDescript);
            }
            else
            {
                provider.ProvNum = Db.NonQ(command, true, "ProvNum", "provider", paramWebSchedDescript);
            }
            return(provider.ProvNum);
        }
 protected virtual void ClearPrefs()
 {
     prefs = new Prefs();
 }
 protected virtual void LoadPrefs()
 {
     prefs = Prefs.Load(prefsKey);
 }
Example #53
0
        void SaveSettingsTask(
            ref string dataDirectory,
            bool useLightChat,
            bool useHardwareRendering,
            bool useTransparentWindows,
            bool ignoreSSLCertificates,
            int maxChatHistory,
            bool enableChatImages,
            bool enableWhisperSound,
            bool enableNameSound,
            string windowSkin,
            bool tileWindowSkin,
            bool useWindowsForChat,
            int chatFontSize,
            bool useInstantSearch,
            bool enableGameSounds,
            Prefs.ZoomType zoomOption)
        {
            this.ValidateFields(
                ref dataDirectory,
                useLightChat,
                useHardwareRendering,
                useTransparentWindows,
                ignoreSSLCertificates,
                maxChatHistory,
                enableChatImages,
                enableWhisperSound,
                enableNameSound,
                windowSkin,
                tileWindowSkin,
                useWindowsForChat,
                chatFontSize,
                useInstantSearch,
                enableGameSounds
                );

            Prefs.DataDirectory = dataDirectory;
            Prefs.UseLightChat = useLightChat;
            Prefs.UseHardwareRendering = useHardwareRendering;
            Prefs.UseWindowTransparency = useTransparentWindows;
            Prefs.IgnoreSSLCertificates = ignoreSSLCertificates;
            Prefs.MaxChatHistory = maxChatHistory;
            Prefs.EnableChatImages = enableChatImages;
            Prefs.EnableWhisperSound = enableWhisperSound;
            Prefs.EnableNameSound = enableNameSound;
            Prefs.WindowSkin = windowSkin;
            Prefs.TileWindowSkin = tileWindowSkin;
            Prefs.UseWindowsForChat = useWindowsForChat;
            Prefs.ChatFontSize = chatFontSize;
            Prefs.InstantSearch = useInstantSearch;
            Prefs.EnableGameSound = enableGameSounds;
            Prefs.ZoomOption = zoomOption;
            //Prefs.EnableChatGifs = enableChatGifs;
        }
 public void SetNames(string[] tokens)
 {
     Prefs prefs = new Prefs();
     for (int i = 0; i < tokens.Length; i++)
         prefs.SetPlayerName(tokens[i], names[i]);
 }