private void Init(TextBlockHelper TBH) { if (mSCIInfoDetails.ShowRepositoryInfo) { TBH.AddBoldText("Solution Repository Info:"); TBH.AddLineBreak(); if (!string.IsNullOrEmpty(mSCIInfoDetails.RepositoryRoot)) { TBH.AddText("RepositoryRoot: " + mSCIInfoDetails.RepositoryRoot); TBH.AddLineBreak(); } if (!string.IsNullOrEmpty(mSCIInfoDetails.RepositoryPath)) { TBH.AddText("RepositoryPath: " + mSCIInfoDetails.RepositoryPath); TBH.AddLineBreak(); } if (!string.IsNullOrEmpty(mSCIInfoDetails.RepositoryId)) { TBH.AddText("RepositoryId: " + mSCIInfoDetails.RepositoryId); TBH.AddLineBreak(); } if (!string.IsNullOrEmpty(mSCIInfoDetails.WorkingCopyRoot)) { TBH.AddText("WorkingCopyRoot: " + mSCIInfoDetails.WorkingCopyRoot); TBH.AddLineBreak(); } if (!string.IsNullOrEmpty(mSCIInfoDetails.WorkingCopySize)) { TBH.AddText("WorkingCopySize: " + mSCIInfoDetails.WorkingCopySize); TBH.AddLineBreak(); } if (!string.IsNullOrEmpty(mSCIInfoDetails.CopyFromRevision)) { TBH.AddText("CopyFromRevision: " + mSCIInfoDetails.CopyFromRevision); TBH.AddLineBreak(); } if (!string.IsNullOrEmpty(mSCIInfoDetails.Revision)) { TBH.AddText("Revision: " + mSCIInfoDetails.Revision); TBH.AddLineBreak(); } if (!string.IsNullOrEmpty(mSCIInfoDetails.TrackedBranchName)) { TBH.AddText("TrackedBranchName: " + mSCIInfoDetails.TrackedBranchName); TBH.AddLineBreak(); } if (!string.IsNullOrEmpty(mSCIInfoDetails.BranchName)) { TBH.AddText("BranchName: " + mSCIInfoDetails.BranchName); TBH.AddLineBreak(); } if (!string.IsNullOrEmpty(mSCIInfoDetails.CanonicalName)) { TBH.AddText("CanonicalName: " + mSCIInfoDetails.CanonicalName); TBH.AddLineBreak(); } if (!string.IsNullOrEmpty(mSCIInfoDetails.FriendlyName)) { TBH.AddText("FriendlyName: " + mSCIInfoDetails.FriendlyName); TBH.AddLineBreak(); } } if (mSCIInfoDetails.ShowFileInfo) { TBH.AddBoldText("File Info:"); TBH.AddLineBreak(); if (!string.IsNullOrEmpty(mSCIInfoDetails.FilePath)) { TBH.AddText("FilePath: " + mSCIInfoDetails.FilePath); TBH.AddLineBreak(); } if (!string.IsNullOrEmpty(mSCIInfoDetails.FileWorkingDirectory)) { TBH.AddText("FileWorkingDirectory: " + mSCIInfoDetails.FileWorkingDirectory); TBH.AddLineBreak(); } if (!string.IsNullOrEmpty(mSCIInfoDetails.FileState)) { TBH.AddText("FileState: " + mSCIInfoDetails.FileState); TBH.AddLineBreak(); } if (!string.IsNullOrEmpty(mSCIInfoDetails.HasUnpushedCommits)) { TBH.AddText("HasUnpushedCommits: " + mSCIInfoDetails.HasUnpushedCommits); TBH.AddLineBreak(); } if (!string.IsNullOrEmpty(mSCIInfoDetails.HasUncommittedChanges)) { TBH.AddText("HasUncommittedChanges: " + mSCIInfoDetails.HasUncommittedChanges); TBH.AddLineBreak(); } } if (mSCIInfoDetails.ShowChangeInfo) { TBH.AddBoldText("Change Info:"); TBH.AddLineBreak(); if (!string.IsNullOrEmpty(mSCIInfoDetails.LastChangeAuthor)) { TBH.AddText("LastChangeAuthor: " + mSCIInfoDetails.LastChangeAuthor); TBH.AddLineBreak(); } if (!string.IsNullOrEmpty(mSCIInfoDetails.LastChangeCommiter)) { TBH.AddText("LastChangeCommiter: " + mSCIInfoDetails.LastChangeCommiter); TBH.AddLineBreak(); } if (!string.IsNullOrEmpty(mSCIInfoDetails.LastChangeRevision)) { TBH.AddText("LastChangeRevision: " + mSCIInfoDetails.LastChangeRevision); TBH.AddLineBreak(); } if (!string.IsNullOrEmpty(mSCIInfoDetails.LastChangeTime)) { TBH.AddText("LastChangeTime: " + mSCIInfoDetails.LastChangeTime); TBH.AddLineBreak(); } if (!string.IsNullOrEmpty(mSCIInfoDetails.LastChangeMessage)) { TBH.AddText("LastChangeTime: " + mSCIInfoDetails.LastChangeMessage); TBH.AddLineBreak(); } } if (mSCIInfoDetails.ShowLock) { TBH.AddBoldText("Lock Info:"); TBH.AddLineBreak(); if (!string.IsNullOrEmpty(mSCIInfoDetails.LockOwner)) { TBH.AddText("LockOwner: " + mSCIInfoDetails.LockOwner); TBH.AddLineBreak(); } if (!string.IsNullOrEmpty(mSCIInfoDetails.LockCreationTime)) { TBH.AddText("LockCreationTime: " + mSCIInfoDetails.LockCreationTime); TBH.AddLineBreak(); } if (!string.IsNullOrEmpty(mSCIInfoDetails.LockComment)) { TBH.AddText("LockComment: " + mSCIInfoDetails.LockComment); TBH.AddLineBreak(); } } }
public override void ActionUserRecommendedUseCase(TextBlockHelper TBH) { TBH.AddText("Use this to Send Keys to Mainframe"); }
public override void ActionUserRecommendedUseCase(TextBlockHelper TBH) { TBH.AddText("See Plugin Documentation"); }
private void FillLogData() { //get the log file text using (StreamReader sr = new StreamReader(mLogFilePath)) { mLogText = sr.ReadToEnd(); } //cut all log not relevent to last application launch int indexOfStart = mLogText.LastIndexOf("######################## Application version"); if (indexOfStart == -1) { indexOfStart = 0; } mLogText = mLogText.Substring(indexOfStart); //split the log per log info string[] logs = mLogText.Split(new[] { Environment.NewLine }, StringSplitOptions.None); xLogDetailsTextBlock.Text = string.Empty; mTextBlockHelper = new TextBlockHelper(xLogDetailsTextBlock); bool allowLogDetailsWrite = true; foreach (string log in logs) { if (log == string.Empty) { if (allowLogDetailsWrite) { mTextBlockHelper.AddLineBreak(); } continue; } else if (log.Contains("#### Application version")) { mTextBlockHelper.AddFormattedText(log, Brushes.Black, true); } else if (IsLogHeader(log)) { if (mLogLevel == eLogShowLevel.ALL || log.Contains("| " + mLogLevel.ToString())) { mTextBlockHelper.AddFormattedText(log, GetProperLogTypeBrush(log), isBold: true); mTextBlockHelper.AddLineBreak(); allowLogDetailsWrite = true; } else { allowLogDetailsWrite = false; } } else { if (allowLogDetailsWrite) { mTextBlockHelper.AddText(log); mTextBlockHelper.AddLineBreak(); } } } }
private void AnalyzerItemsGrid_RowChangedEvent(object sender, EventArgs e) { txtBlkAnalyzerIssue.Text = string.Empty; TextBlockHelper TBH = new TextBlockHelper(txtBlkAnalyzerIssue); AnalyzerItemBase a = (AnalyzerItemBase)AnalyzerItemsGrid.CurrentItem; if (a != null) { if (a.ItemClass != null) { TBH.AddLineBreak(); TBH.AddBoldText("Item Type:"); TBH.AddLineBreak(); TBH.AddText(a.ItemClass.ToString()); TBH.AddLineBreak(); } if (a.ItemName != null) { TBH.AddLineBreak(); TBH.AddBoldText("Item Name:"); TBH.AddLineBreak(); TBH.AddText(a.ItemName.ToString()); TBH.AddLineBreak(); } if (a.ItemParent != null) { TBH.AddLineBreak(); TBH.AddBoldText("Item Parent:"); TBH.AddLineBreak(); TBH.AddText(a.ItemParent.ToString()); TBH.AddLineBreak(); } if (a.Description != null) { TBH.AddLineBreak(); TBH.AddBoldText("Issue:"); TBH.AddLineBreak(); TBH.AddText(a.Description.ToString()); TBH.AddLineBreak(); } if (a.Details != null) { TBH.AddLineBreak(); TBH.AddBoldText("Issue Details:"); TBH.AddLineBreak(); TBH.AddText(a.Details.ToString()); TBH.AddLineBreak(); } if (a.Impact != null) { TBH.AddLineBreak(); TBH.AddBoldText("Issue Impact:"); TBH.AddLineBreak(); TBH.AddText(a.Impact.ToString()); TBH.AddLineBreak(); } if (a.HowToFix != null) { TBH.AddLineBreak(); TBH.AddBoldText("How To Fix:"); TBH.AddLineBreak(); TBH.AddText(a.HowToFix.ToString()); TBH.AddLineBreak(); } TBH.AddLineBreak(); TBH.AddBoldText("Can be Auto Fixed:"); TBH.AddLineBreak(); TBH.AddText(a.CanAutoFix.ToString()); TBH.AddLineBreak(); } }
public override void ActionUserRecommendedUseCase(TextBlockHelper TBH) { TBH.AddText("Use this action in case you need to create new Action with the common data and binding method."); }
public override void ActionUserRecommendedUseCase(TextBlockHelper TBH) { TBH.AddText("UI Element Action"); }
public ConsoleTextWriter(TextBlock output, Brush brush = null) { mTextBlock = output; mTextBlockHelper = new TextBlockHelper(mTextBlock); }
public override void ActionUserRecommendedUseCase(TextBlockHelper TBH) { TBH.AddText("Use this action to Read/Write Data from a common place for all Business Flows/Activities/Actions."); }
public override void ActionUserRecommendedUseCase(TextBlockHelper TBH) { TBH.AddText("Use this action in case you need to automate smart sync."); }
private async void InitializeLimit(IProtoService protoService, PremiumLimitType type) { var limit = await GetPremiumLimitAsync(protoService, type) as PremiumLimit; if (limit != null) { var iconValue = string.Empty; var freeValue = string.Empty; var lockedValue = string.Empty; var premiumValue = string.Empty; var animatedValue = new Uri("ms-appx:///Assets/Animations/Double.json"); switch (type) { case PremiumLimitTypeChatFilterChosenChatCount: iconValue = Icons.ChatFilled; freeValue = Strings.Resources.LimitReachedChatInFolders; lockedValue = Strings.Resources.LimitReachedChatInFoldersLocked; premiumValue = Strings.Resources.LimitReachedChatInFoldersPremium; break; case PremiumLimitTypeChatFilterCount: iconValue = Icons.FolderFilled; freeValue = Strings.Resources.LimitReachedFolders; lockedValue = Strings.Resources.LimitReachedFoldersLocked; premiumValue = Strings.Resources.LimitReachedFoldersPremium; break; case PremiumLimitTypeCreatedPublicChatCount: iconValue = Icons.LinkFilled; freeValue = Strings.Resources.LimitReachedPublicLinks; lockedValue = Strings.Resources.LimitReachedPublicLinksLocked; premiumValue = Strings.Resources.LimitReachedPublicLinksPremium; break; case PremiumLimitTypePinnedArchivedChatCount: case PremiumLimitTypePinnedChatCount: iconValue = Icons.PinFilled; freeValue = Strings.Resources.LimitReachedPinDialogs; lockedValue = Strings.Resources.LimitReachedPinDialogsLocked; premiumValue = Strings.Resources.LimitReachedPinDialogsPremium; break; case PremiumLimitTypeSupergroupCount: iconValue = Icons.PeopleFilled; freeValue = Strings.Resources.LimitReachedCommunities; lockedValue = Strings.Resources.LimitReachedCommunitiesLocked; premiumValue = Strings.Resources.LimitReachedCommunitiesPremium; break; case PremiumLimitTypeConnectedAccounts: iconValue = Icons.PersonFilled; freeValue = Strings.Resources.LimitReachedAccounts; lockedValue = Strings.Resources.LimitReachedAccountsPremium; premiumValue = Strings.Resources.LimitReachedAccountsPremium; animatedValue = new Uri("ms-appx:///Assets/Animations/AddOne.json"); break; } if (protoService.IsPremium) { TextBlockHelper.SetMarkdown(Subtitle, string.Format(premiumValue, limit.PremiumValue)); Icon.Text = iconValue; Limit.Text = limit.PremiumValue.ToString(); LimitBubble.CornerRadius = new CornerRadius(14, 14, 0, 14); LimitHeader.HorizontalAlignment = HorizontalAlignment.Right; PrevArrow.Visibility = Visibility.Collapsed; PrevLimit.Text = limit.DefaultValue.ToString(); NextLimit.Text = string.Empty; PurchaseIcon.ColorReplacements = new Dictionary <int, int> { { 0x000000, 0xffffff } }; PurchaseIcon.Source = animatedValue; PurchaseLabel.Text = Strings.Resources.IncreaseLimit; } else if (protoService.IsPremiumAvailable) { TextBlockHelper.SetMarkdown(Subtitle, string.Format(freeValue, limit.DefaultValue, limit.PremiumValue)); Icon.Text = iconValue; Limit.Text = limit.DefaultValue.ToString(); LimitBubble.CornerRadius = new CornerRadius(14, 14, 14, 14); LimitHeader.HorizontalAlignment = HorizontalAlignment.Center; NextArrow.Visibility = Visibility.Collapsed; PrevLimit.Text = string.Empty; NextLimit.Text = limit.PremiumValue.ToString(); PurchaseIcon.ColorReplacements = new Dictionary <int, int> { { 0x000000, 0xffffff } }; PurchaseIcon.Source = animatedValue; PurchaseLabel.Text = Strings.Resources.IncreaseLimit; } else { TextBlockHelper.SetMarkdown(Subtitle, string.Format(lockedValue, limit.DefaultValue)); LimitHeader.Visibility = Visibility.Collapsed; LimitPanel.Visibility = Visibility.Collapsed; PurchaseCommand.Style = App.Current.Resources["AccentButtonStyle"] as Style; PurchaseIcon.Visibility = Visibility.Collapsed; PurchaseLabel.Text = Strings.Resources.OK; } } }
private void SetDependenciesHelper() { try { txtBlkDependenciesHelper.Text = string.Empty; TextBlockHelper TBH = new TextBlockHelper(txtBlkDependenciesHelper); //check if the mechanisem is enabeled switch (mDepededItemType) { case (eDependedItemsType.Actions): if (((Activity)mParentObject).EnableActionsVariablesDependenciesControl == false) { TBH.AddFormattedText("The Actions-" + GingerDicser.GetTermResValue(eTermResKey.Variables) + " Dependencies control is disabled, in order to change the dependencies configurations you must enable it first.", Brushes.OrangeRed, true); return; } break; case (eDependedItemsType.Activities): if (((BusinessFlow)mParentObject).EnableActivitiesVariablesDependenciesControl == false) { TBH.AddFormattedText("The " + GingerDicser.GetTermResValue(eTermResKey.Activities) + "-" + GingerDicser.GetTermResValue(eTermResKey.Variables) + " Dependencies control is disabled, in order to change the dependencies configurations you must enable it first.", Brushes.OrangeRed, true); return; } break; } //check for missing depended items/variables bool dependedItemsOrVarsAremissing = false; switch (mDepededItemType) { case (eDependedItemsType.Actions): if (((Activity)mParentObject).Acts.Count == 0) { TBH.AddFormattedText("Add Actions to the " + GingerDicser.GetTermResValue(eTermResKey.Activity) + " in order to configure dependencies.", Brushes.OrangeRed, true); TBH.AddLineBreak(); dependedItemsOrVarsAremissing = true; } break; case (eDependedItemsType.Activities): if (((BusinessFlow)mParentObject).Activities.Count == 0) { TBH.AddFormattedText("Add " + GingerDicser.GetTermResValue(eTermResKey.Activities) + " to the " + GingerDicser.GetTermResValue(eTermResKey.BusinessFlow) + " in order to configure dependencies.", Brushes.OrangeRed, true); TBH.AddLineBreak(); dependedItemsOrVarsAremissing = true; } break; } if (mParentListVars == null || mParentListVars.Count == 0) { switch (mDepededItemType) { case (eDependedItemsType.Actions): TBH.AddFormattedText("Add " + GingerDicser.GetTermResValue(eTermResKey.Variables) + " from type 'Selection List' to the " + GingerDicser.GetTermResValue(eTermResKey.Activity) + " in order to configure dependencies.", Brushes.OrangeRed, true); break; case (eDependedItemsType.Activities): TBH.AddFormattedText("Add " + GingerDicser.GetTermResValue(eTermResKey.Variables) + " from type 'Selection List' to the " + GingerDicser.GetTermResValue(eTermResKey.BusinessFlow) + " in order to configure dependencies.", Brushes.OrangeRed, true); break; } TBH.AddLineBreak(); dependedItemsOrVarsAremissing = true; } if (dependedItemsOrVarsAremissing) { return; } //Set helper according to selected row DataRowView currentRow = (DataRowView)grdDependencies.grdMain.CurrentItem; if (currentRow != null) { TBH.AddFormattedText("'" + currentRow.Row[0].ToString() + "'", null, true, true); switch (mDepededItemType) { case (eDependedItemsType.Actions): TBH.AddUnderLineText(" Action Dependencies Configurations Meaning:"); break; case (eDependedItemsType.Activities): TBH.AddUnderLineText(" " + GingerDicser.GetTermResValue(eTermResKey.Activity) + " Dependencies Configurations Meaning:"); break; } TBH.AddLineBreak(); Dictionary <string, List <string> > actionConfigs = new Dictionary <string, List <string> >(); int colsIndex = 2; foreach (VariableBase var in mParentListVars) { List <string> configuredVals = new List <string>(); foreach (OptionalValue optVal in ((VariableSelectionList)var).OptionalValuesList) { if ((bool)currentRow[colsIndex] == true) { configuredVals.Add(optVal.Value); } colsIndex++; } actionConfigs.Add(var.Name, configuredVals); } List <KeyValuePair <string, List <string> > > notConfiguredVars = actionConfigs.Where(d => d.Value.Count == 0).ToList(); if (notConfiguredVars.Count == 0) { switch (mDepededItemType) { case (eDependedItemsType.Actions): TBH.AddText("The action will be executed only in case:"); break; case (eDependedItemsType.Activities): TBH.AddText("The " + GingerDicser.GetTermResValue(eTermResKey.Activity) + " will be executed only in case:"); break; } TBH.AddLineBreak(); bool isFirst = true; foreach (KeyValuePair <string, List <string> > configuredVar in actionConfigs) { if (!isFirst) { TBH.AddText("And"); TBH.AddLineBreak(); } isFirst = false; TBH.AddBoldText("'" + configuredVar.Key + "' "); TBH.AddText(GingerDicser.GetTermResValue(eTermResKey.Variable) + " selected value is: "); string vars = string.Empty; foreach (string configVal in configuredVar.Value) { vars = vars + "'" + configVal + "' Or "; } vars = vars.Remove(vars.Length - 4, 4); TBH.AddText(vars); TBH.AddLineBreak(); } } else { switch (mDepededItemType) { case (eDependedItemsType.Actions): TBH.AddFormattedText("The action won't be executed in any case because it missing dependency configurations for the " + GingerDicser.GetTermResValue(eTermResKey.Variable) + "/s: ", Brushes.OrangeRed, true); break; case (eDependedItemsType.Activities): TBH.AddFormattedText("The " + GingerDicser.GetTermResValue(eTermResKey.Activity) + " won't be executed in any case because it missing dependency configurations for the " + GingerDicser.GetTermResValue(eTermResKey.Variable) + "/s: ", Brushes.OrangeRed, true); break; } TBH.AddLineBreak(); foreach (KeyValuePair <string, List <string> > notConfiguredVar in notConfiguredVars) { TBH.AddFormattedText("'" + notConfiguredVar.Key + "'", Brushes.OrangeRed); TBH.AddLineBreak(); } } } else { TBH.AddText("Select cell/row for information."); } } catch (Exception ex) { Reporter.ToLog(eLogLevel.ERROR, "Failed to set the " + mDepededItemType.ToString() + "-Variables dependencies helper text", ex); } }
public override void ActionUserRecommendedUseCase(TextBlockHelper TBH) { TBH.AddText("Use this action in case you want to compare the screen area."); }
public override void ActionUserRecommendedUseCase(TextBlockHelper TBH) { TBH.AddText("Use this action to perform validations Using Value Expression editor "); }
public override void ActionUserRecommendedUseCase(TextBlockHelper TBH) { TBH.AddText("Use this action in case you need to run Shell action like: ps, ls etc."); }
public override void ActionUserRecommendedUseCase(TextBlockHelper TBH) { TBH.AddText("Use this action in case you need Media actions like: Record Audio, Video Play..."); }
public override void ActionUserRecommendedUseCase(TextBlockHelper TBH) { TBH.AddText("Use this action to open a url in ginger.To open an url,just put url in value and run the action."); }
public override void ActionUserRecommendedUseCase(TextBlockHelper TBH) { }
public override void ActionUserRecommendedUseCase(TextBlockHelper TBH) { TBH.AddText("Use this action in case you need to automate a check/Un-check an object from type Checkbox." + Environment.NewLine + Environment.NewLine + "For Mobile use this action only in case running the flow on the native browser."); }
private void SetDescriptionDetails() { try { txtDescription.Text = string.Empty; TextBlockHelper TBH = new TextBlockHelper(txtDescription); TBH.AddText("Select the grid cell located by "); TBH.AddUnderLineText(cmbColSelectorValue.ComboBox.SelectedItem.ToString()); TBH.AddText(" "); if (cmbColumnValue.ComboBox.SelectedIndex != -1) { TBH.AddBoldText(cmbColumnValue.ComboBox.SelectedItem.ToString()); } else { TBH.AddBoldText(cmbColumnValue.ComboBox.Text); } TBH.AddText(" and "); if (RowNum.IsChecked == true) { TBH.AddUnderLineText(" row number "); if (RowSelectorValue.ComboBox.SelectedIndex != -1) { TBH.AddBoldText(RowSelectorValue.ComboBox.SelectedItem.ToString()); } else { TBH.AddBoldText(RowSelectorValue.ComboBox.Text); } } else if (AnyRow.IsChecked == true) { TBH.AddUnderLineText(" random "); TBH.AddText(" row number"); } else if (Where.IsChecked == true) { TBH.AddText(" the row located by a cell in "); TBH.AddUnderLineText(WhereColumn.ComboBox.SelectedItem.ToString()); TBH.AddText(" "); if (WhereColumnTitle.ComboBox.SelectedIndex != -1) { TBH.AddBoldText(WhereColumnTitle.ComboBox.SelectedItem.ToString()); } else { TBH.AddBoldText(WhereColumnTitle.ComboBox.Text); } TBH.AddText(" having control property "); TBH.AddUnderLineText(WhereProperty.ComboBox.SelectedItem.ToString()); TBH.AddText(" "); TBH.AddUnderLineText(WhereOperator.ComboBox.SelectedItem.ToString()); TBH.AddText(" "); TBH.AddBoldText(WhereColumnValue.ValueTextBox.Text); } } catch (Exception ex) { Reporter.ToLog(eLogLevel.ERROR, "Failed", ex); } }
public override void ActionUserRecommendedUseCase(TextBlockHelper TBH) { TBH.AddText("Use this action in case you need to run click on device button like: Power/Volume/Home"); }
public override void ActionUserRecommendedUseCase(TextBlockHelper TBH) { TBH.AddText("Use this action to perform File operations "); }
public override void ActionUserRecommendedUseCase(TextBlockHelper TBH) { TBH.AddText("Use this action to get Text/Details of a filed at a particular location in Terminal"); }