diff --git a/CodeHubDesktop/CodeHubDesktop.csproj b/CodeHubDesktop/CodeHubDesktop.csproj
index 72ba897..c65f2e0 100644
--- a/CodeHubDesktop/CodeHubDesktop.csproj
+++ b/CodeHubDesktop/CodeHubDesktop.csproj
@@ -5,11 +5,11 @@
true
CodeHubDesktop
CodeHubDesktop
- 1.1.0.0
+ 1.2.0.0
Debug;Release
Copyright © Mahdi 2018-2020
- 1.1.0.0
- 1.1.0.0
+ 1.2.0.0
+ 1.2.0.0
latest
en;fa;en-US;fa-IR
Resources\gitbanner_6jm_icon.ico
@@ -26,6 +26,10 @@
+
+
+
+
@@ -59,11 +63,20 @@
True
Lang.resx
+
+ True
+ True
+ Resources.resx
+
PublicResXFileCodeGenerator
Lang.Designer.cs
+
+ ResXFileCodeGenerator
+ Resources.Designer.cs
+
\ No newline at end of file
diff --git a/CodeHubDesktop/Controls/HighlightingDefinitionConverter.cs b/CodeHubDesktop/Controls/HighlightingDefinitionConverter.cs
new file mode 100644
index 0000000..09aaec1
--- /dev/null
+++ b/CodeHubDesktop/Controls/HighlightingDefinitionConverter.cs
@@ -0,0 +1,38 @@
+using CodeHubDesktop.Models;
+using ICSharpCode.AvalonEdit.Highlighting;
+using System;
+using System.Globalization;
+using System.Windows.Data;
+
+namespace CodeHubDesktop.Controls
+{
+ public class HighlightingDefinitionConverter : IValueConverter
+ {
+ private static readonly HighlightingDefinitionTypeConverter Converter = new HighlightingDefinitionTypeConverter();
+
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ if (value != null)
+ {
+ LanguageModel code = value as LanguageModel;
+ if (code != null)
+ {
+ return Converter.ConvertFrom(code.DisplayName);
+ }
+ else
+ {
+ return Converter.ConvertFrom("C#");
+ }
+ }
+ else
+ {
+ return Converter.ConvertFrom("C#");
+ }
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ return Converter.ConvertToString(value);
+ }
+ }
+}
diff --git a/CodeHubDesktop/Models/LanguageModel.cs b/CodeHubDesktop/Models/LanguageModel.cs
new file mode 100644
index 0000000..6e3f509
--- /dev/null
+++ b/CodeHubDesktop/Models/LanguageModel.cs
@@ -0,0 +1,8 @@
+namespace CodeHubDesktop.Models
+{
+ public class LanguageModel
+ {
+ public string Name { get; set; }
+ public string DisplayName { get; set; }
+ }
+}
diff --git a/CodeHubDesktop/Properties/Resources.Designer.cs b/CodeHubDesktop/Properties/Resources.Designer.cs
new file mode 100644
index 0000000..0a6de6d
--- /dev/null
+++ b/CodeHubDesktop/Properties/Resources.Designer.cs
@@ -0,0 +1,95 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace CodeHubDesktop.Properties {
+ using System;
+
+
+ ///
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ ///
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Resources {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources() {
+ }
+
+ ///
+ /// Returns the cached ResourceManager instance used by this class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CodeHubDesktop.Properties.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ ///
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to ABAP,abap
+ ///ABNF,abnf
+ ///Ada,ada
+ ///ADL,adl
+ ///Agda,agda
+ ///Aheui,aheui
+ ///autohotkey,ahk
+ ///Alloy,alloy
+ ///Ampl,ampl
+ ///ANTLR,antlr
+ ///ANTLR_With_ActionScript_Target,antlr-as
+ ///ANTLR_With_CPP_Target,antlr-cpp
+ ///ANTLR_With_C__Target,antlr-csharp
+ ///ANTLR_With_Java_Target,antlr-java
+ ///ANTLR_With_ObjectiveC_Target,antlr-objc
+ ///ANTLR_With_Perl_Target,antlr-perl
+ ///ANTLR_With_Python_Target,antlr-python
+ ///ANTLR_With_Ruby_Target,antlr-ruby
+ ///ApacheConf,apacheconf
+ ///APL,apl
+ ///AppleScript,applescript
+ ///Arduino,arduino
+ ///ActionScript,as
+ ///ActionScri [rest of string was truncated]";.
+ ///
+ internal static string LanguageList {
+ get {
+ return ResourceManager.GetString("LanguageList", resourceCulture);
+ }
+ }
+ }
+}
diff --git a/CodeHubDesktop/Properties/Resources.resx b/CodeHubDesktop/Properties/Resources.resx
new file mode 100644
index 0000000..a701c1b
--- /dev/null
+++ b/CodeHubDesktop/Properties/Resources.resx
@@ -0,0 +1,124 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+
+ ..\Resources\LanguageList.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/CodeHubDesktop/Resources/LanguageList.txt b/CodeHubDesktop/Resources/LanguageList.txt
new file mode 100644
index 0000000..b267fd5
--- /dev/null
+++ b/CodeHubDesktop/Resources/LanguageList.txt
@@ -0,0 +1,474 @@
+ABAP,abap
+ABNF,abnf
+Ada,ada
+ADL,adl
+Agda,agda
+Aheui,aheui
+autohotkey,ahk
+Alloy,alloy
+Ampl,ampl
+ANTLR,antlr
+ANTLR_With_ActionScript_Target,antlr-as
+ANTLR_With_CPP_Target,antlr-cpp
+ANTLR_With_C__Target,antlr-csharp
+ANTLR_With_Java_Target,antlr-java
+ANTLR_With_ObjectiveC_Target,antlr-objc
+ANTLR_With_Perl_Target,antlr-perl
+ANTLR_With_Python_Target,antlr-python
+ANTLR_With_Ruby_Target,antlr-ruby
+ApacheConf,apacheconf
+APL,apl
+AppleScript,applescript
+Arduino,arduino
+ActionScript,as
+ActionScript_3,as3
+AspectJ,aspectj
+aspx_cs,aspx-cs
+aspx_vb,aspx-vb
+Asymptote,asy
+AmbientTalk,at
+Augeas,augeas
+AutoIt,autoit
+Awk,awk
+Base_Makefile,basemake
+Bash,bash
+Batchfile,bat
+BBC_Basic,bbcbasic
+BBCode,bbcode
+BC,bc
+Befunge,befunge
+BibTeX,bib
+BlitzBasic,blitzbasic
+BlitzMax,blitzmax
+BNF,bnf
+Boa,boa
+Boo,boo
+Boogie,boogie
+Brainfuck,brainfuck
+BST,bst
+BUGS,bugs
+C,c
+c_objdump,c-objdump
+ca65_assembler,ca65
+cADL,cadl
+CAmkES,camkes
+CapDL,capdl
+Cap_n_Proto,capnp
+CBM_BASIC_V2,cbmbas
+Ceylon,ceylon
+Coldfusion_CFC,cfc
+CFEngine3,cfengine3
+Coldfusion_HTML,cfm
+cfstatement,cfs
+ChaiScript,chai
+Chapel,chapel
+Charmci,charmci
+Cheetah,cheetah
+Cirru,cirru
+Clay,clay
+Clean,clean
+Clojure,clojure
+ClojureScript,clojurescript
+CMake,cmake
+COBOL,cobol
+COBOLFree,cobolfree
+CoffeeScript,coffee-script
+Common_Lisp,common-lisp
+Component_Pascal,componentpascal
+Bash_Session,console
+Deban_Control_file,control
+Coq,coq
+C__,cpp
+cpp_objdump,cpp-objdump
+CPSA,cpsa
+Crystal,cr
+Crmsh,crmsh
+Croc,croc
+Cryptol,cryptol
+C#,csharp
+Csound_Orchestra,csound
+Csound_Document,csound-document
+Csound_Score,csound-score
+CSS,css
+CSS_Django_Jinja,css+django
+CSS_Ruby,css+erb
+CSS_Genshi_Text,css+genshitext
+CSS_Lasso,css+lasso
+CSS_Mako,css+mako
+CSS_mozpreproc,css+mozpreproc
+CSS_Myghty,css+myghty
+CSS_PHP,css+php
+CSS_Smarty,css+smarty
+Gherkin,cucumber
+CUDA,cuda
+Cypher,cypher
+Cython,cython
+D,d
+d_objdump,d-objdump
+Dart,dart
+DASM16,dasm16
+Delphi,delphi
+dg,dg
+Diff,diff
+Django_Jinja,django
+Docker,docker
+MSDOS_Session,doscon
+Darcs_Patch,dpatch
+DTD,dtd
+Duel,duel
+Dylan,dylan
+Dylan_session,dylan-console
+DylanLID,dylan-lid
+Earl_Grey,earl-grey
+Easytrieve,easytrieve
+EBNF,ebnf
+eC,ec
+ECL,ecl
+Eiffel,eiffel
+Elixir,elixir
+Elm,elm
+EmacsLisp,emacs
+E_mail,email
+ERB,erb
+Erlang_erl_session,erl
+Erlang,erlang
+Evoque,evoque
+xtlang,extempore
+Ezhil,ezhil
+Factor,factor
+Fantom,fan
+Fancy,fancy
+Felix,felix
+Fennel,fennel
+Fish,fish
+Flatline,flatline
+FloScript,floscript
+Forth,forth
+Fortran,fortran
+FortranFixed,fortranfixed
+FoxPro,foxpro
+Freefem,freefem
+F#,fsharp
+GAP,gap
+GAS,gas
+Genshi,genshi
+Genshi_Text,genshitext
+GLSL,glsl
+Gnuplot,gnuplot
+Go,go
+Golo,golo
+GoodData_CL,gooddata-cl
+Gosu,gosu
+Groff,groff
+Groovy,groovy
+Gosu_Template,gst
+Haml,haml
+Handlebars,handlebars
+Haskell,haskell
+Hxml,haxeml
+Hexdump,hexdump
+HLSL,hlsl
+HSAIL,hsail
+Hspec,hspec
+HTML,html
+HTML_Cheetah,html+cheetah
+HTML_Django_Jinja,html+django
+HTML_Evoque,html+evoque
+HTML_Genshi,html+genshi
+HTML_Handlebars,html+handlebars
+HTML_Lasso,html+lasso
+HTML_Mako,html+mako
+HTML_Myghty,html+myghty
+HTML___Angular2,html+ng2
+HTML_PHP,html+php
+HTML_Smarty,html+smarty
+HTML_Twig,html+twig
+HTML_Velocity,html+velocity
+HTTP,http
+Haxe,hx
+Hybris,hybris
+Hy,hylang
+Inform_6_template,i6t
+Icon,icon
+IDL,idl
+Idris,idris
+Elixir_iex_session,iex
+Igor,igor
+Inform_6,inform6
+Inform_7,inform7
+INI,ini
+Io,io
+Ioke,ioke
+IRC_logs,irc
+Isabelle,isabelle
+J,j
+JAGS,jags
+Jasmin,jasmin
+Java,java
+Javascript_mozpreproc,javascript+mozpreproc
+JCL,jcl
+Julia_console,jlcon
+JavaScript,js
+JavaScript_Cheetah,js+cheetah
+JavaScript_Django_Jinja,js+django
+JavaScript_Ruby,js+erb
+JavaScript_Genshi_Text,js+genshitext
+JavaScript_Lasso,js+lasso
+JavaScript_Mako,js+mako
+JavaScript_Myghty,js+myghty
+JavaScript_PHP,js+php
+JavaScript_Smarty,js+smarty
+JSGF,jsgf
+JSON,json
+JSONBareObject,json-object
+JSON_LD,jsonld
+Java_Server_Page,jsp
+Julia,julia
+Juttle,juttle
+Kal,kal
+Kconfig,kconfig
+Kernel_log,kmsg
+Koka,koka
+Kotlin,kotlin
+Literate_Agda,lagda
+Lasso,lasso
+Literate_Cryptol,lcry
+Lean,lean
+LessCss,less
+Literate_Haskell,lhs
+Literate_Idris,lidr
+Lighttpd_configuration_file,lighty
+Limbo,limbo
+liquid,liquid
+LiveScript,live-script
+LLVM,llvm
+LLVM_MIR,llvm-mir
+LLVM_MIR_Body,llvm-mir-body
+Logos,logos
+Logtalk,logtalk
+LSL,lsl
+Lua,lua
+Makefile,make
+Mako,mako
+MAQL,maql
+Mask,mask
+Mason,mason
+Mathematica,mathematica
+Matlab,matlab
+Matlab_session,matlabsession
+markdown,md
+MIME,mime
+MiniD,minid
+Modelica,modelica
+Modula_2,modula2
+Monkey,monkey
+Monte,monte
+MOOCode,moocode
+MoonScript,moon
+Mosel,mosel
+mozhashpreproc,mozhashpreproc
+mozpercentpreproc,mozpercentpreproc
+MQL,mql
+MiniScript,ms
+Mscgen,mscgen
+MuPAD,mupad
+MXML,mxml
+Myghty,myghty
+MySQL,mysql
+NASM,nasm
+NCL,ncl
+Nemerle,nemerle
+nesC,nesc
+NewLisp,newlisp
+Newspeak,newspeak
+Angular2,ng2
+Nginx_configuration_file,nginx
+Nimrod,nim
+Nit,nit
+Nix,nixos
+Notmuch,notmuch
+NSIS,nsis
+NumPy,numpy
+NuSMV,nusmv
+objdump,objdump
+objdump_nasm,objdump-nasm
+Objective_C,objective-c
+Objective_C__,objective-c++
+Objective_J,objective-j
+OCaml,ocaml
+Octave,octave
+ODIN,odin
+Ooc,ooc
+Opa,opa
+OpenEdge_ABL,openedge
+PacmanConf,pacmanconf
+Pan,pan
+ParaSail,parasail
+Pawn,pawn
+PEG,peg
+Perl,perl
+Perl6,perl6
+PHP,php
+Pig,pig
+Pike,pike
+PkgConfig,pkgconfig
+PL_pgSQL,plpgsql
+Pony,pony
+PostgreSQL_SQL_dialect,postgresql
+PostScript,postscript
+Gettext_Catalog,pot
+POVRay,pov
+PowerShell,powershell
+Praat,praat
+Prolog,prolog
+Properties,properties
+Protocol_Buffer,protobuf
+PowerShell_Session,ps1con
+PostgreSQL_console__psql_,psql
+Pug,pug
+Puppet,puppet
+Python_2_x_Traceback,py2tb
+Python_console_session,pycon
+PyPy_Log,pypylog
+Python_Traceback,pytb
+Python,python
+Python_2_x,python2
+QBasic,qbasic
+QML,qml
+QVTO,qvto
+Racket,racket
+Ragel,ragel
+Ragel_in_C_Host,ragel-c
+Ragel_in_CPP_Host,ragel-cpp
+Ragel_in_D_Host,ragel-d
+Embedded_Ragel,ragel-em
+Ragel_in_Java_Host,ragel-java
+Ragel_in_Objective_C_Host,ragel-objc
+Ragel_in_Ruby_Host,ragel-ruby
+Raw_token_data,raw
+Ruby,rb
+Ruby_irb_session,rbcon
+RConsole,rconsole
+Rd,rd
+ReasonML,reason
+REBOL,rebol
+Red,red
+Redcode,redcode
+reg,registry
+ResourceBundle,resource
+Rexx,rexx
+RHTML,rhtml
+Ride,ride
+Relax_NG_Compact,rnc
+Roboconf_Graph,roboconf-graph
+Roboconf_Instances,roboconf-instances
+RobotFramework,robotframework
+RQL,rql
+RSL,rsl
+reStructuredText,rst
+TrafficScript,rts
+Rust,rust
+SARL,sarl
+SAS,sas
+Sass,sass
+SuperCollider,sc
+Scala,scala
+Scaml,scaml
+scdoc,scdoc
+Scheme,scheme
+Scilab,scilab
+SCSS,scss
+SmartGameFormat,sgf
+Shen,shen
+ShExC,shexc
+Sieve,sieve
+Silver,silver
+Slash,slash
+Slim,slim
+Slurm,slurm
+Smali,smali
+Smalltalk,smalltalk
+Smarty,smarty
+Standard_ML,sml
+Snobol,snobol
+Snowball,snowball
+Solidity,solidity
+Debian_Sourcelist,sourceslist
+SourcePawn,sp
+SPARQL,sparql
+RPMSpec,spec
+S,splus
+SQL,sql
+sqlite3con,sqlite3
+SquidConf,squidconf
+Scalate_Server_Page,ssp
+Stan,stan
+Stata,stata
+Swift,swift
+SWIG,swig
+systemverilog,systemverilog
+TADS_3,tads3
+TAP,tap
+TASM,tasm
+Tcl,tcl
+Tcsh,tcsh
+Tcsh_Session,tcshcon
+Tea,tea
+Termcap,termcap
+Terminfo,terminfo
+Terraform,terraform
+TeX,tex
+Text_only,text
+Thrift,thrift
+Todotxt,todotxt
+TOML,toml
+MoinMoin_Trac_Wiki_markup,trac-wiki
+Treetop,treetop
+TypeScript,ts
+Transact_SQL,tsql
+Tera_Term_macro,ttl
+Turtle,turtle
+Twig,twig
+TypoScript,typoscript
+TypoScriptCssData,typoscriptcssdata
+TypoScriptHtmlData,typoscripthtmldata
+ucode,ucode
+Unicon,unicon
+UrbiScript,urbiscript
+USD,usd
+Vala,vala
+VB_net,vb.net
+VBScript,vbscript
+VCL,vcl
+VCLSnippets,vclsnippets
+VCTreeStatus,vctreestatus
+Velocity,velocity
+verilog,verilog
+VGL,vgl
+vhdl,vhdl
+VimL,vim
+WDiff,wdiff
+Web_IDL,webidl
+Whiley,whiley
+X10,x10
+XML,xml
+XML_Cheetah,xml+cheetah
+XML_Django_Jinja,xml+django
+XML_Ruby,xml+erb
+XML_Evoque,xml+evoque
+XML_Lasso,xml+lasso
+XML_Mako,xml+mako
+XML_Myghty,xml+myghty
+XML_PHP,xml+php
+XML_Smarty,xml+smarty
+XML_Velocity,xml+velocity
+Xorg,xorg.conf
+XQuery,xquery
+XSLT,xslt
+Xtend,xtend
+XUL_mozpreproc,xul+mozpreproc
+YAML,yaml
+YAML_Jinja,yaml+jinja
+Zeek,zeek
+Zephir,zephir
+Zig,zig
\ No newline at end of file
diff --git a/CodeHubDesktop/ViewModels/CreateSnippetViewModel.cs b/CodeHubDesktop/ViewModels/CreateSnippetViewModel.cs
index a5bf99a..7fa0cf2 100644
--- a/CodeHubDesktop/ViewModels/CreateSnippetViewModel.cs
+++ b/CodeHubDesktop/ViewModels/CreateSnippetViewModel.cs
@@ -6,7 +6,6 @@
using Prism.Mvvm;
using System;
using System.Collections.ObjectModel;
-using System.Linq;
using System.Net.Http;
using System.Text;
@@ -55,15 +54,15 @@ public string Detail
set => SetProperty(ref _Detail, value);
}
- private string _SelectedCode;
- public string SelectedCode
+ private LanguageModel _SelectedCode;
+ public LanguageModel SelectedCode
{
get => _SelectedCode;
set => SetProperty(ref _SelectedCode, value);
}
- private ObservableCollection _LanguageList = new ObservableCollection();
- public ObservableCollection LanguageList
+ private ObservableCollection _LanguageList = new ObservableCollection();
+ public ObservableCollection LanguageList
{
get => _LanguageList;
set => SetProperty(ref _LanguageList, value);
@@ -88,7 +87,7 @@ private async void OnCreateSnippet()
{
title = Subject,
detail = Detail,
- language = SelectedCode.ToLower(),
+ language = SelectedCode.Name ?? "csharp",
script = Snippet,
error = Error
};
@@ -138,484 +137,14 @@ private void OnClear()
internal void FillComboBox()
{
- string[] languages = new string[] {
- "ABAP",
- "ABNF",
- "Ada",
- "ADL",
- "Agda",
- "Aheui",
- "autohotkey",
- "Alloy",
- "Ampl",
- "ANTLR",
- "ANTLR With ActionScript Target",
- "ANTLR With CPP Target",
- "ANTLR With C# Target",
- "ANTLR With Java Target",
- "ANTLR With ObjectiveC Target",
- "ANTLR With Perl Target",
- "ANTLR With Python Target",
- "ANTLR With Ruby Target",
- "ApacheConf",
- "APL",
- "AppleScript",
- "Arduino",
- "ActionScript",
- "ActionScript 3",
- "AspectJ",
- "aspx-cs",
- "aspx-vb",
- "Asymptote",
- "AmbientTalk",
- "Augeas",
- "AutoIt",
- "Awk",
- "Base Makefile",
- "Bash",
- "Batchfile",
- "BBC Basic",
- "BBCode",
- "BC",
- "Befunge",
- "BibTeX",
- "BlitzBasic",
- "BlitzMax",
- "BNF",
- "Boa",
- "Boo",
- "Boogie",
- "Brainfuck",
- "BST",
- "BUGS",
- "C",
- "c-objdump",
- "ca65 assembler",
- "cADL",
- "CAmkES",
- "CapDL",
- "Cap'n Proto",
- "CBM BASIC V2",
- "Ceylon",
- "Coldfusion CFC",
- "CFEngine3",
- "Coldfusion HTML",
- "cfstatement",
- "ChaiScript",
- "Chapel",
- "Charmci",
- "Cheetah",
- "Cirru",
- "Clay",
- "Clean",
- "Clojure",
- "ClojureScript",
- "CMake",
- "COBOL",
- "COBOLFree",
- "CoffeeScript",
- "Common Lisp",
- "Component Pascal",
- "Bash Session",
- "Debian Control file",
- "Coq",
- "C++",
- "cpp-objdump",
- "CPSA",
- "Crystal",
- "Crmsh",
- "Croc",
- "Cryptol",
- "C#",
- "Csound Orchestra",
- "Csound Document",
- "Csound Score",
- "CSS",
- "CSS+Django/Jinja",
- "CSS+Ruby",
- "CSS+Genshi Text",
- "CSS+Lasso",
- "CSS+Mako",
- "CSS+mozpreproc",
- "CSS+Myghty",
- "CSS+PHP",
- "CSS+Smarty",
- "Gherkin",
- "CUDA",
- "Cypher",
- "Cython",
- "D",
- "d-objdump",
- "Dart",
- "DASM16",
- "Delphi",
- "dg",
- "Diff",
- "Django/Jinja",
- "Docker",
- "MSDOS Session",
- "Darcs Patch",
- "DTD",
- "Duel",
- "Dylan",
- "Dylan session",
- "DylanLID",
- "Earl Grey",
- "Easytrieve",
- "EBNF",
- "eC",
- "ECL",
- "Eiffel",
- "Elixir",
- "Elm",
- "EmacsLisp",
- "E-mail",
- "ERB",
- "Erlang erl session",
- "Erlang",
- "Evoque",
- "xtlang",
- "Ezhil",
- "Factor",
- "Fantom",
- "Fancy",
- "Felix",
- "Fennel",
- "Fish",
- "Flatline",
- "FloScript",
- "Forth",
- "Fortran",
- "FortranFixed",
- "FoxPro",
- "Freefem",
- "F#",
- "GAP",
- "GAS",
- "Genshi",
- "Genshi Text",
- "GLSL",
- "Gnuplot",
- "Go",
- "Golo",
- "GoodData-CL",
- "Gosu",
- "Groff",
- "Groovy",
- "Gosu Template",
- "Haml",
- "Handlebars",
- "Haskell",
- "Hxml",
- "Hexdump",
- "HLSL",
- "HSAIL",
- "Hspec",
- "HTML",
- "HTML+Cheetah",
- "HTML+Django/Jinja",
- "HTML+Evoque",
- "HTML+Genshi",
- "HTML+Handlebars",
- "HTML+Lasso",
- "HTML+Mako",
- "HTML+Myghty",
- "HTML + Angular2",
- "HTML+PHP",
- "HTML+Smarty",
- "HTML+Twig",
- "HTML+Velocity",
- "HTTP",
- "Haxe",
- "Hybris",
- "Hy",
- "Inform 6 template",
- "Icon",
- "IDL",
- "Idris",
- "Elixir iex session",
- "Igor",
- "Inform 6",
- "Inform 7",
- "INI",
- "Io",
- "Ioke",
- "IRC logs",
- "Isabelle",
- "J",
- "JAGS",
- "Jasmin",
- "Java",
- "Javascript+mozpreproc",
- "JCL",
- "Julia console",
- "JavaScript",
- "JavaScript+Cheetah",
- "JavaScript+Django/Jinja",
- "JavaScript+Ruby",
- "JavaScript+Genshi Text",
- "JavaScript+Lasso",
- "JavaScript+Mako",
- "JavaScript+Myghty",
- "JavaScript+PHP",
- "JavaScript+Smarty",
- "JSGF",
- "JSON",
- "JSONBareObject",
- "JSON-LD",
- "Java Server Page",
- "Julia",
- "Juttle",
- "Kal",
- "Kconfig",
- "Kernel log",
- "Koka",
- "Kotlin",
- "Literate Agda",
- "Lasso",
- "Literate Cryptol",
- "Lean",
- "LessCss",
- "Literate Haskell",
- "Literate Idris",
- "Lighttpd configuration file",
- "Limbo",
- "liquid",
- "LiveScript",
- "LLVM",
- "LLVM-MIR",
- "LLVM-MIR Body",
- "Logos",
- "Logtalk",
- "LSL",
- "Lua",
- "Makefile",
- "Mako",
- "MAQL",
- "Mask",
- "Mason",
- "Mathematica",
- "Matlab",
- "Matlab session",
- "markdown",
- "MIME",
- "MiniD",
- "Modelica",
- "Modula-2",
- "Monkey",
- "Monte",
- "MOOCode",
- "MoonScript",
- "Mosel",
- "mozhashpreproc",
- "mozpercentpreproc",
- "MQL",
- "MiniScript",
- "Mscgen",
- "MuPAD",
- "MXML",
- "Myghty",
- "MySQL",
- "NASM",
- "NCL",
- "Nemerle",
- "nesC",
- "NewLisp",
- "Newspeak",
- "Angular2",
- "Nginx configuration file",
- "Nimrod",
- "Nit",
- "Nix",
- "Notmuch",
- "NSIS",
- "NumPy",
- "NuSMV",
- "objdump",
- "objdump-nasm",
- "Objective-C",
- "Objective-C++",
- "Objective-J",
- "OCaml",
- "Octave",
- "ODIN",
- "Ooc",
- "Opa",
- "OpenEdge ABL",
- "PacmanConf",
- "Pan",
- "ParaSail",
- "Pawn",
- "PEG",
- "Perl",
- "Perl6",
- "PHP",
- "Pig",
- "Pike",
- "PkgConfig",
- "PL/pgSQL",
- "Pony",
- "PostgreSQL SQL dialect",
- "PostScript",
- "Gettext Catalog",
- "POVRay",
- "PowerShell",
- "Praat",
- "Prolog",
- "Properties",
- "Protocol Buffer",
- "PowerShell Session",
- "PostgreSQL console (psql)",
- "Pug",
- "Puppet",
- "Python 2.x Traceback",
- "Python console session",
- "PyPy Log",
- "Python Traceback",
- "Python",
- "Python 2.x",
- "QBasic",
- "QML",
- "QVTO",
- "Racket",
- "Ragel",
- "Ragel in C Host",
- "Ragel in CPP Host",
- "Ragel in D Host",
- "Embedded Ragel",
- "Ragel in Java Host",
- "Ragel in Objective C Host",
- "Ragel in Ruby Host",
- "Raw token data",
- "Ruby",
- "Ruby irb session",
- "RConsole",
- "Rd",
- "ReasonML",
- "REBOL",
- "Red",
- "Redcode",
- "reg",
- "ResourceBundle",
- "Rexx",
- "RHTML",
- "Ride",
- "Relax-NG Compact",
- "Roboconf Graph",
- "Roboconf Instances",
- "RobotFramework",
- "RQL",
- "RSL",
- "reStructuredText",
- "TrafficScript",
- "Rust",
- "SARL",
- "SAS",
- "Sass",
- "SuperCollider",
- "Scala",
- "Scaml",
- "scdoc",
- "Scheme",
- "Scilab",
- "SCSS",
- "SmartGameFormat",
- "Shen",
- "ShExC",
- "Sieve",
- "Silver",
- "Slash",
- "Slim",
- "Slurm",
- "Smali",
- "Smalltalk",
- "Smarty",
- "Standard ML",
- "Snobol",
- "Snowball",
- "Solidity",
- "Debian Sourcelist",
- "SourcePawn",
- "SPARQL",
- "RPMSpec",
- "S",
- "SQL",
- "sqlite3con",
- "SquidConf",
- "Scalate Server Page",
- "Stan",
- "Stata",
- "Swift",
- "SWIG",
- "systemverilog",
- "TADS 3",
- "TAP",
- "TASM",
- "Tcl",
- "Tcsh",
- "Tcsh Session",
- "Tea",
- "Termcap",
- "Terminfo",
- "Terraform",
- "TeX",
- "Text only",
- "Thrift",
- "Todotxt",
- "TOML",
- "MoinMoin/Trac Wiki markup",
- "Treetop",
- "TypeScript",
- "Transact-SQL",
- "Tera Term macro",
- "Turtle",
- "Twig",
- "TypoScript",
- "TypoScriptCssData",
- "TypoScriptHtmlData",
- "ucode",
- "Unicon",
- "UrbiScript",
- "USD",
- "Vala",
- "VB.net",
- "VBScript",
- "VCL",
- "VCLSnippets",
- "VCTreeStatus",
- "Velocity",
- "verilog",
- "VGL",
- "vhdl",
- "VimL",
- "WDiff",
- "Web IDL",
- "Whiley",
- "X10",
- "XML",
- "XML+Cheetah",
- "XML+Django/Jinja",
- "XML+Ruby",
- "XML+Evoque",
- "XML+Lasso",
- "XML+Mako",
- "XML+Myghty",
- "XML+PHP",
- "XML+Smarty",
- "XML+Velocity",
- "Xorg",
- "XQuery",
- "XSLT",
- "Xtend",
- "XUL+mozpreproc",
- "YAML",
- "YAML+Jinja",
- "Zeek",
- "Zephir",
- "Zig"
- };
- string[] languagesUpper = languages.Select(s => s.ToUpperInvariant()).ToArray();
- LanguageList.AddRange(languagesUpper);
+ string languageResource = Properties.Resources.LanguageList;
+ string[] allLines = languageResource.Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries);
+ foreach (string item in allLines)
+ {
+ string[] line = item.Split(",");
+ LanguageList.Add(new LanguageModel { DisplayName = line[0].Replace("_", " "), Name = line[1] });
+
+ }
}
}
}
diff --git a/CodeHubDesktop/Views/CreateSnippet.xaml b/CodeHubDesktop/Views/CreateSnippet.xaml
index 1938e56..493310b 100644
--- a/CodeHubDesktop/Views/CreateSnippet.xaml
+++ b/CodeHubDesktop/Views/CreateSnippet.xaml
@@ -8,13 +8,16 @@
xmlns:ext="clr-namespace:CodeHubDesktop.DynamicLanguage"
ext:Translation.ResourceManager="{x:Static lang:Lang.ResourceManager}"
prism:ViewModelLocator.AutoWireViewModel="True">
+
+
+
-
-
+
+
diff --git a/CodeHubDesktop/Views/SnippetOnline.xaml b/CodeHubDesktop/Views/SnippetOnline.xaml
index 69bcef2..bb62e36 100644
--- a/CodeHubDesktop/Views/SnippetOnline.xaml
+++ b/CodeHubDesktop/Views/SnippetOnline.xaml
@@ -8,6 +8,9 @@
ext:Translation.ResourceManager="{x:Static lang:Lang.ResourceManager}"
xmlns:control="clr-namespace:CodeHubDesktop.Controls"
prism:ViewModelLocator.AutoWireViewModel="True">
+
+
+
@@ -30,7 +33,7 @@
-
+
diff --git a/README.md b/README.md
index 1a6ce29..a1c1187 100644
--- a/README.md
+++ b/README.md
@@ -4,10 +4,20 @@ CodeHub is a platform for archiving the errors, bugs, and scripts you intend to
This App work with CodeHub API services.
- Prism MVVM
-- EntityFrameWorkCore
+- EntityFrameWorkCore Sqlite
- .Net Core 3.1
- Multi Language (Dynamic)
- Dark/Light/Violet Theme
+## Release
+The latest Release can be found [here](https://github.com/CodeHub-Contributors/CodeHubDesktop/releases)
+
+## How To Build From Source?
+1. [Download](https://visualstudio.microsoft.com/) and Install Visual Studio 2019
+2. [Download](https://dotnet.microsoft.com/download/dotnet-core/3.1) and Install .Net Core 3.1 SDK
+3. Clone or Download Source Code `git clone https://github.com/CodeHub-Contributors/CodeHubDesktop.git`
+4. Open CodeHubDesktop.sln with Visual Studio
+5. Rebuild Project
+
![CodeHubDesktop](ScreenShot/1.png)
![CodeHubDesktop](ScreenShot/2.png)
diff --git a/ScreenShot/1.png b/ScreenShot/1.png
index 0ec9703..3a38cc2 100644
Binary files a/ScreenShot/1.png and b/ScreenShot/1.png differ
diff --git a/ScreenShot/2.png b/ScreenShot/2.png
index f4a1084..f679104 100644
Binary files a/ScreenShot/2.png and b/ScreenShot/2.png differ